4 {
6public:
9protected:
11 const Options&
options)
override {
13 for (
int y = 0;
y <
info.height(); ++
y) {
14 for (
int x = 0;
x <
info.width(); ++
x) {
15 pixels[
y *
info.width() +
x] = 0xff223344 +
y * 0x000C0811;
16 }
17 }
18 return true;
19 }
20};
21
31}
32}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
virtual bool isLazyGenerated() const =0
~TestImageGenerator() override
TestImageGenerator(TestType type, skiatest::Reporter *reporter, SkColorType colorType=kN32_SkColorType)
bool onGetPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, const Options &options) override
sk_sp< SkFontMgr > fontMgr
SK_API sk_sp< SkImage > DeferredFromGenerator(std::unique_ptr< SkImageGenerator > imageGenerator)
sk_sp< const SkImage > image
font
Font Metadata and Metrics.