Go to the source code of this file.
|
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) |
|
| DEF_SIMPLE_GM (glyph_pos_n_b, c, 800, 600) |
|
| DEF_SIMPLE_GM (glyph_pos_h_s, c, 800, 600) |
|
| DEF_SIMPLE_GM (glyph_pos_n_s, c, 800, 600) |
|
| DEF_SIMPLE_GM (glyph_pos_h_f, c, 800, 600) |
|
| DEF_SIMPLE_GM (glyph_pos_n_f, c, 800, 600) |
|
◆ DEF_SIMPLE_GM() [1/6]
DEF_SIMPLE_GM |
( |
glyph_pos_h_b |
, |
|
|
c |
, |
|
|
800 |
, |
|
|
600 |
|
|
) |
| |
Definition at line 150 of file glyph_pos.cpp.
150 {
152}
@ kStrokeAndFill_Style
sets to stroke and fill geometry
static void draw_gm(SkCanvas *canvas, SkScalar strokeWidth, SkPaint::Style strokeStyle)
◆ DEF_SIMPLE_GM() [2/6]
DEF_SIMPLE_GM |
( |
glyph_pos_h_f |
, |
|
|
c |
, |
|
|
800 |
, |
|
|
600 |
|
|
) |
| |
Definition at line 162 of file glyph_pos.cpp.
162 {
164}
@ kFill_Style
set to fill geometry
◆ DEF_SIMPLE_GM() [3/6]
DEF_SIMPLE_GM |
( |
glyph_pos_h_s |
, |
|
|
c |
, |
|
|
800 |
, |
|
|
600 |
|
|
) |
| |
Definition at line 156 of file glyph_pos.cpp.
156 {
158}
@ kStroke_Style
set to stroke geometry
◆ DEF_SIMPLE_GM() [4/6]
DEF_SIMPLE_GM |
( |
glyph_pos_n_b |
, |
|
|
c |
, |
|
|
800 |
, |
|
|
600 |
|
|
) |
| |
◆ DEF_SIMPLE_GM() [5/6]
DEF_SIMPLE_GM |
( |
glyph_pos_n_f |
, |
|
|
c |
, |
|
|
800 |
, |
|
|
600 |
|
|
) |
| |
◆ DEF_SIMPLE_GM() [6/6]
DEF_SIMPLE_GM |
( |
glyph_pos_n_s |
, |
|
|
c |
, |
|
|
800 |
, |
|
|
600 |
|
|
) |
| |
◆ draw_gm()
Definition at line 35 of file glyph_pos.cpp.
37 {
38
40
41
44
47
48
51 canvas->
scale(3.0f, 3.0f);
54
55
58 canvas->
scale(3.0f, 6.0f);
61
62
65 canvas->
scale(3.0f, 3.0f);
73
74
82
83 canvas->
concat(perspective);
86}
static const int strokeWidth
#define SkScalarInvert(x)
void drawPoint(SkScalar x, SkScalar y, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void scale(SkScalar sx, SkScalar sy)
void concat(const SkMatrix &matrix)
SkMatrix & setSkewX(SkScalar v)
SkMatrix & setPerspX(SkScalar v)
SkMatrix & setSkewY(SkScalar v)
static void drawTestCase(SkCanvas *canvas, SkScalar textScale, SkScalar strokeWidth, SkPaint::Style strokeStyle)
◆ drawTestCase()
Definition at line 88 of file glyph_pos.cpp.
91 {
94 paint.setAntiAlias(
true);
96 paint.setStyle(strokeStyle);
97
99
100
101
102
105
107 if (drawRef) {
110
111 paint.setStrokeWidth(0.0f);
113
114
117
118
121 }
122
123
126 paint.setStyle(strokeStyle);
129
130 if (drawRef) {
131 const size_t len =
sizeof(
kText) - 1;
136
137 paint.setStrokeWidth(0.0f);
139
140
143 for (
size_t i = 0;
i <
sizeof(
kText) - 1; ++
i) {
146 }
147 }
148}
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
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
SkMatrix getLocalToDeviceAs3x3() const
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
@ kTranslate_Mask
translation SkMatrix
@ kIdentity_Mask
identity SkMatrix; all bits clear
constexpr SkScalar kTextHeight
Optional< SkRect > bounds
font
Font Metadata and Metrics.
◆ kText
constexpr char kText[] = "Proportional Hamburgefons #% fi" |
|
constexpr |
◆ kTextHeight