4 {
8 surf->getCanvas()->drawRect({0, 0, 1, 1},
SkPaint());
9 surf->getCanvas()->drawRect({1, 1, 2, 2},
SkPaint());
13}
14
18
19
22 p.setShader(make_bw_dither());
26
27
30 canvas->
scale(0.5, 0.5);
34
35
37 p.setColor(0x80000000);
42
43
45 p.setColor(0xFFBCBCBC);
48
49
51 p.setColor(0xFF808080);
54}
55}
constexpr SkColor SK_ColorWHITE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
sk_sp< SkFontMgr > fontMgr
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
font
Font Metadata and Metrics.
SkSamplingOptions(SkFilterMode::kLinear))
static SkImageInfo MakeN32Premul(int width, int height)