Go to the source code of this file.
|
static void | draw_line (SkCanvas *canvas, const SkPoint &p0, const SkPoint &p1, const SkPaint &paint, bool useDrawPath) |
|
static void | draw_fins (SkCanvas *canvas, const SkPoint &offset, float angle, const SkPaint &paint, bool useDrawPath) |
|
static void | draw_snowflake (SkCanvas *canvas, const SkPaint &paint, bool useDrawPath) |
|
static void | draw_row (SkCanvas *canvas, const SkPaint &paint, const SkMatrix &localMatrix, bool useDrawPath) |
|
static void | skiagm::draw_path (SkCanvas *canvas, const SkPoint &p0, const SkPoint &p1, SkPaint::Cap cap) |
|
| skiagm::DEF_SIMPLE_GM (strokedline_caps, canvas, 1400, 740) |
|
◆ draw_fins()
static void draw_fins |
( |
SkCanvas * |
canvas, |
|
|
const SkPoint & |
offset, |
|
|
float |
angle, |
|
|
const SkPaint & |
paint, |
|
|
bool |
useDrawPath |
|
) |
| |
|
static |
Definition at line 53 of file strokedlines.cpp.
54 {
56
57
62
64
65
70
72}
#define SkScalarSin(radians)
#define SkScalarCos(radians)
static void draw_line(SkCanvas *canvas, const SkPoint &p0, const SkPoint &p1, const SkPaint &paint, bool useDrawPath)
◆ draw_line()
Definition at line 44 of file strokedlines.cpp.
45 {
46 if (useDrawPath) {
48 } else {
50 }
51}
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void drawPath(const SkPath &path, const SkPaint &paint)
static SkPath Line(const SkPoint a, const SkPoint b)
◆ draw_row()
Definition at line 99 of file strokedlines.cpp.
100 {
102
104 for (auto isAA : { true, false }) {
108 tmp.setStrokeCap(cap);
109 tmp.setAntiAlias(isAA);
110
111 int saveCount = canvas->
save();
112 canvas->
concat(localMatrix);
115
117 }
118 }
119}
void translate(SkScalar dx, SkScalar dy)
void restoreToCount(int saveCount)
void concat(const SkMatrix &matrix)
@ kButt_Cap
no stroke extension
@ kStroke_Style
set to stroke geometry
constexpr SkScalar kStrokeWidth
static void draw_snowflake(SkCanvas *canvas, const SkPaint &paint, bool useDrawPath)
◆ draw_snowflake()
static void draw_snowflake |
( |
SkCanvas * |
canvas, |
|
|
const SkPaint & |
paint, |
|
|
bool |
useDrawPath |
|
) |
| |
|
static |
Definition at line 75 of file strokedlines.cpp.
75 {
76
78
85
86
88
89
92
93
96 }
97}
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
static void draw_fins(SkCanvas *canvas, const SkPoint &offset, float angle, const SkPaint &paint, bool useDrawPath)
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
◆ kNumColumns
constexpr int kNumColumns = 6 |
|
constexpr |
◆ kNumRows
constexpr int kNumRows = 8 |
|
constexpr |
◆ kNumSpokes
constexpr int kNumSpokes = 6 |
|
constexpr |
◆ kPad
◆ kRadius
constexpr int kRadius = 40 |
|
constexpr |
◆ kStrokeWidth