6 bool forceRaster =
false;
8 bool postDither =
false;
15 canvas->
drawRect({350, 0, 400, 480}, ltGrayPaint);
16 canvas->
drawRect({400, 0, 500, 480}, grayPaint);
18 canvas->
drawRect({0, 200, 320, 215}, ltGrayPaint);
19 canvas->
drawRect({0, 215, 320, 230}, grayPaint);
43 c->drawRect(
SkRect{0, 20, 640, 104}, blrPaint);
49 static constexpr SkPoint pts[]{{0.5, 0}, {256.5, 0}};
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kNormal_SkBlurStyle
fuzzy inside and outside
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
constexpr SkColor SK_ColorLTGRAY
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorGRAY
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorWHITE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
REG_FIDDLE(blur4444, 650, 480, false, 0)
void drawRect(const SkRect &rect, const SkPaint &paint)
virtual GrRecordingContext * recordingContext() const
void clear(SkColor color)
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
void setColor(SkColor color)
void setAntiAlias(bool aa)
void setDither(bool dither)
void setMaskFilter(sk_sp< SkMaskFilter > maskFilter)
void setShader(sk_sp< SkShader > shader)
void setBlendMode(SkBlendMode mode)
void draw(SkCanvas *canvas, SkScalar x, SkScalar y, const SkSamplingOptions &sampling, const SkPaint *paint)
PODArray< SkColor > colors
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
SkSamplingOptions(SkFilterMode::kLinear))
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
constexpr SkRect makeOffset(float dx, float dy) const