35 paint.setColor(0xff00ff00);
42 stroke.setColor(0xff008800);
62 void onDraw(
SkCanvas* canvas)
override {
76 paint.setShader(fSrcImageShader);
103 paint.setShader(fSrcImageShader);
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorWHITE
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawPaint(const SkPaint &paint)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
void clear(SkColor color)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawPath(const SkPath &path, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
@ kStroke_Style
set to stroke geometry
static SkPath Line(const SkPoint a, const SkPoint b)
sk_sp< SkImage > makeImageSnapshot()
GM(SkColor backgroundColor=SK_ColorWHITE)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static sk_sp< SkImage > create_image(SkCanvas *destCanvas)
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr float kStrokeWidth
constexpr SkRect kSrcImageClip
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
constexpr float left() const
constexpr float top() const
SkScalar fLeft
smaller x-axis bounds
SkRect makeOutset(float dx, float dy) const
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
SkRect makeInset(float dx, float dy) const
SkScalar fRight
larger x-axis bounds
constexpr float height() const
constexpr float centerY() const
constexpr float width() const