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
10
void draw(SkCanvas* canvas) {
float red = 0.07f, green = 0.13f, blue = 0.32f, alpha = 0.17f;
SkColor4f color4f = { red, green, blue, alpha };
SkColor argb = color4f.toSkColor();
SkDebugf("red=%u green=%u blue=%u alpha=%u\n", SkColorGetR(argb),
SkColorGetG(argb), SkColorGetB(argb), SkColorGetA(argb));
SkColor4f fromSkColor = SkColor4f::FromColor(argb);
SkDebugf("red=%g green=%g blue=%g alpha=%g\n", fromSkColor.fR, fromSkColor.fG,
fromSkColor.fB, fromSkColor.fA);
}