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
28
void draw(SkCanvas* canvas) {
SkPaint fillPaint;
SkPaint strokePaint;
SkPaint paint;
SkFont font;
paint.setAntiAlias(true);
font.setSize(20);
font.setSubpixel(true);
paint.setStyle (SkPaint::kFill_Style);
paint.setBlendMode(SkBlendMode::kSrc);
char str[1024];
char str1[1024];
SkTypeface *typeface;
typeface = font.getTypefaceOrDefault();
sprintf(str1, "getTypeface() = %d",typeface->countGlyphs());
int glyphs = font.getTypefaceOrDefault()->countGlyphs();
// paint.setARGB(255, 255, 255, 255);
sprintf(str, "glyphs = %d", glyphs);
canvas->drawSimpleText(
"Skkia", strlen("Skkia"), SkTextEncoding::kUTF8, SkIntToScalar(30), SkIntToScalar(50), font, paint);
canvas->drawSimpleText(
str, strlen(str), SkTextEncoding::kUTF8, SkIntToScalar(30), SkIntToScalar(100), font, paint);
canvas->drawSimpleText(
str1, strlen(str1), SkTextEncoding::kUTF8, 20, 130, font, paint);
canvas->drawString("Draw String ........", 20, 160, SkFont(), SkPaint());
}