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
27
void draw(SkCanvas* canvas) {
canvas->drawColor(SK_ColorWHITE);
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
paint.setStrokeWidth(.05);
paint.setColor(0xff1f78b4);
paint.setAntiAlias(true);
paint.setStrokeCap(SkPaint::kRound_Cap);
SkPaint paint2(paint);
paint2.setStyle(SkPaint::kFill_Style);
paint2.setColor(0xfff10600);
SkRect rect;
rect.setXYWH(.05, .05, 1., 1.);
SkPath path;
path.addOval(rect, SkPath::kCW_Direction);
SkPath path2;
paint.getFillPath(path, &path2, nullptr, 200.);
canvas->scale(200., 200.);
canvas->drawPath(path, paint);
canvas->drawPath(path2, paint2);
}