|
20 | 20 | #include "include/core/SkRasterHandleAllocator.h"
|
21 | 21 | #include "include/core/SkRect.h"
|
22 | 22 | #include "include/core/SkRefCnt.h"
|
| 23 | +#include "include/core/SkSamplingOptions.h" |
23 | 24 | #include "include/core/SkScalar.h"
|
24 | 25 | #include "include/core/SkSize.h"
|
25 | 26 | #include "include/core/SkString.h"
|
@@ -55,7 +56,6 @@ class SkPixmap;
|
55 | 56 | class SkRegion;
|
56 | 57 | class SkRRect;
|
57 | 58 | struct SkRSXform;
|
58 |
| -struct SkSamplingOptions; |
59 | 59 | class SkSurface;
|
60 | 60 | class SkSurface_Base;
|
61 | 61 | class SkTextBlob;
|
@@ -1668,36 +1668,18 @@ class SK_API SkCanvas {
|
1668 | 1668 | @param image SkImage containing pixels, dimensions, and format
|
1669 | 1669 | @param center SkIRect edge of image corners and sides
|
1670 | 1670 | @param dst destination SkRect of image to draw to
|
| 1671 | + @param filter what technique to use when sampling the image |
1671 | 1672 | @param paint SkPaint containing SkBlendMode, SkColorFilter, SkImageFilter,
|
1672 | 1673 | and so on; or nullptr
|
1673 | 1674 | */
|
1674 | 1675 | void drawImageNine(const SkImage* image, const SkIRect& center, const SkRect& dst,
|
1675 |
| - const SkPaint* paint = nullptr); |
1676 |
| - |
1677 |
| - /** Draws SkImage image stretched proportionally to fit into SkRect dst. |
1678 |
| - SkIRect center divides the image into nine sections: four sides, four corners, and |
1679 |
| - the center. Corners are not scaled, or scaled down proportionately if their sides |
1680 |
| - are larger than dst; center and four sides are scaled to fit remaining space, if any. |
1681 |
| -
|
1682 |
| - Additionally transform draw using clip, SkMatrix, and optional SkPaint paint. |
1683 |
| -
|
1684 |
| - If SkPaint paint is supplied, apply SkColorFilter, alpha, SkImageFilter, and |
1685 |
| - SkBlendMode. If image is kAlpha_8_SkColorType, apply SkShader. |
1686 |
| - If paint contains SkMaskFilter, generate mask from image bounds. If paint |
1687 |
| - SkFilterQuality set to kNone_SkFilterQuality, disable pixel filtering. For all |
1688 |
| - other values of paint SkFilterQuality, use kLow_SkFilterQuality to filter pixels. |
1689 |
| - Any SkMaskFilter on paint is ignored as is paint anti-aliasing state. |
| 1676 | + SkFilterMode filter, const SkPaint* paint = nullptr); |
1690 | 1677 |
|
1691 |
| - If generated mask extends beyond image bounds, replicate image edge colors, just |
1692 |
| - as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set |
1693 |
| - replicates the image edge color when it samples outside of its bounds. |
| 1678 | + // DEPRECATED -- pass filtermode explicitly |
| 1679 | + void drawImageNine(const SkImage* image, const SkIRect& center, const SkRect& dst, |
| 1680 | + const SkPaint* paint = nullptr); |
1694 | 1681 |
|
1695 |
| - @param image SkImage containing pixels, dimensions, and format |
1696 |
| - @param center SkIRect edge of image corners and sides |
1697 |
| - @param dst destination SkRect of image to draw to |
1698 |
| - @param paint SkPaint containing SkBlendMode, SkColorFilter, SkImageFilter, |
1699 |
| - and so on; or nullptr |
1700 |
| - */ |
| 1682 | + // DEPRECATED -- pass filtermode explicitly |
1701 | 1683 | void drawImageNine(const sk_sp<SkImage>& image, const SkIRect& center, const SkRect& dst,
|
1702 | 1684 | const SkPaint* paint = nullptr) {
|
1703 | 1685 | this->drawImageNine(image.get(), center, dst, paint);
|
@@ -1860,9 +1842,14 @@ class SK_API SkCanvas {
|
1860 | 1842 | @param image SkImage containing pixels, dimensions, and format
|
1861 | 1843 | @param lattice division of bitmap into fixed and variable rectangles
|
1862 | 1844 | @param dst destination SkRect of image to draw to
|
| 1845 | + @param filter what technique to use when sampling the image |
1863 | 1846 | @param paint SkPaint containing SkBlendMode, SkColorFilter, SkImageFilter,
|
1864 | 1847 | and so on; or nullptr
|
1865 | 1848 | */
|
| 1849 | + void drawImageLattice(const SkImage* image, const Lattice& lattice, const SkRect& dst, |
| 1850 | + SkFilterMode filter, const SkPaint* paint = nullptr); |
| 1851 | + |
| 1852 | + // DEPRECATED -- pass filtermode explicitly |
1866 | 1853 | void drawImageLattice(const SkImage* image, const Lattice& lattice, const SkRect& dst,
|
1867 | 1854 | const SkPaint* paint = nullptr);
|
1868 | 1855 |
|
|
0 commit comments