32 {
33
37 paint.setAntiAlias(
true);
38
40 constexpr SkRect rect2 = { 0, 0, 20, 20 };
41
42 constexpr SkScalar gStrokeWidths[] = {
43 4, 2, 1, 0.5f, 0.25f, 0.125f, 0
44 };
45
47 for (int i = 0; i < 8; ++i) {
50 for (size_t j = 0; j < std::size(gStrokeWidths); ++j) {
51 paint.setStrokeWidth(gStrokeWidths[j]);
54 }
56 }
57
58
61 for (int i = 0; i < 8; ++i) {
64 canvas->
scale(0.5f, 0.5f);
65 for (size_t j = 0; j < std::size(gStrokeWidths); ++j) {
66 paint.setStrokeWidth(2.0f * gStrokeWidths[j]);
69 }
71 }
72 }
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorWHITE
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void scale(SkScalar sx, SkScalar sy)
@ kStroke_Style
set to stroke geometry
sk_sp< SkBlender > blender SkRect rect