Options
These globals are now defined:
double duration; // The requested duration of the animation. double frame; // A value in [0, 1] of where we are in the animation.
This global is now defined:
GrBackendRenderTarget backEndRenderTarget;
GrBackendTexture backEndTextureRenderTarget;
Optional source image
These globals are now defined:
SkBitmap source; sk_sp<SkImage> image; GrBackendTexture backEndTexture; // GPU Only.
Note:
Adding comments with SK_FOLD_START and SK_FOLD_END creates foldable code
blocks.
These blocks will be folded by default and are useful for highlighting specific lines of code.
You can also use the keyboard shortcuts Ctrl+S and Ctrl+E in the code editor to set them.
These blocks will be folded by default and are useful for highlighting specific lines of code.
You can also use the keyboard shortcuts Ctrl+S and Ctrl+E in the code editor to set them.
xxxxxxxxxx
30
void draw(SkCanvas* canvas) {
canvas->scale(0.4, 0.4);
canvas->translate(175, 175);
SkPaint p;
p.setColor(SK_ColorBLACK);
p.setAntiAlias(true);
p.setStyle(SkPaint::kStroke_Style);
p.setStrokeWidth(400);
SkPoint p1 = SkPoint::Make(60, -40);
SkPoint p2 = SkPoint::Make(120, 150);
SkPoint p3 = SkPoint::Make(180, 60);
SkPath path;
path.moveTo(20, 60);
path.cubicTo(p1, p2, p3);
// path.close();
SkPath fillpath;
skpathutils::FillPathWithPaint(path, p, &fillpath);
SkPaint fillp;
fillp.setColor(SK_ColorMAGENTA);
fillp.setAntiAlias(true);
fillp.setStyle(SkPaint::kStroke_Style);
fillp.setStrokeWidth(0);
canvas->drawPath(path, p);
canvas->drawPath(fillpath, fillp);
}