28constexpr char kText[] =
"Proportional Hamburgefons #% fi";
51 canvas->
scale(3.0f, 3.0f);
58 canvas->
scale(3.0f, 6.0f);
65 canvas->
scale(3.0f, 3.0f);
83 canvas->
concat(perspective);
94 paint.setAntiAlias(
true);
96 paint.setStyle(strokeStyle);
111 paint.setStrokeWidth(0.0f);
126 paint.setStyle(strokeStyle);
131 const size_t len =
sizeof(
kText) - 1;
137 paint.setStrokeWidth(0.0f);
143 for (
size_t i = 0;
i <
sizeof(
kText) - 1; ++
i) {
static const int strokeWidth
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
@ kUTF8
uses bytes to represent UTF-8 or ASCII
#define SkScalarInvert(x)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawPoint(SkScalar x, SkScalar y, const SkPaint &paint)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
SkMatrix getLocalToDeviceAs3x3() const
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void concat(const SkMatrix &matrix)
SkMatrix & setSkewX(SkScalar v)
SkMatrix & setPerspX(SkScalar v)
SkMatrix & setSkewY(SkScalar v)
@ kTranslate_Mask
translation SkMatrix
@ kIdentity_Mask
identity SkMatrix; all bits clear
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
@ kStrokeAndFill_Style
sets to stroke and fill geometry
constexpr SkScalar kTextHeight
static void drawTestCase(SkCanvas *canvas, SkScalar textScale, SkScalar strokeWidth, SkPaint::Style strokeStyle)
static void draw_gm(SkCanvas *canvas, SkScalar strokeWidth, SkPaint::Style strokeStyle)
DEF_SIMPLE_GM(glyph_pos_h_b, c, 800, 600)
Optional< SkRect > bounds
font
Font Metadata and Metrics.