Definition at line 27 of file imagesource2.cpp.
◆ ImageSourceGM()
skiagm::ImageSourceGM::ImageSourceGM |
( |
const char * |
suffix, |
|
|
const SkSamplingOptions & |
sampling |
|
) |
| |
|
inline |
Definition at line 29 of file imagesource2.cpp.
30 : fSuffix(suffix), fSampling(sampling) {
32 }
◆ getISize()
SkISize skiagm::ImageSourceGM::getISize |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getName()
SkString skiagm::ImageSourceGM::getName |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ onDraw()
void skiagm::ImageSourceGM::onDraw |
( |
SkCanvas * |
canvas | ) |
|
|
inlineoverrideprotectedvirtual |
Reimplemented from skiagm::GM.
Definition at line 73 of file imagesource2.cpp.
73 {
78
81
84 }
int saveLayer(const SkRect *bounds, const SkPaint *paint)
static sk_sp< SkImageFilter > Image(sk_sp< SkImage > image, const SkRect &srcRect, const SkRect &dstRect, const SkSamplingOptions &sampling)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
◆ onOnceBeforeDraw()
void skiagm::ImageSourceGM::onOnceBeforeDraw |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
Reimplemented from skiagm::GM.
Definition at line 44 of file imagesource2.cpp.
44 {
53 };
54
57
58 int curColor = 0;
59
60 for (
int x = 0;
x < kImageSize;
x += 3) {
66
67 curColor = (curColor+1) % std::size(
gColors);
68 }
69
70 fImage =
surface->makeImageSnapshot();
71 }
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
void drawRect(const SkRect &rect, const SkPaint &paint)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
constexpr SkColor gColors[]
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
The documentation for this class was generated from the following file: