| 1 |
// Copyright 2019 Google LLC. |
| 2 |
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| 3 |
#include "tools/fiddle/examples.h" |
| 4 |
REG_FIDDLE(Canvas_drawPoint_2, 256, 256, false, 0) { |
| 5 |
void draw(SkCanvas* canvas) { |
| 6 |
SkPaint paint; |
| 7 |
paint.setAntiAlias(true); |
| 8 |
paint.setColor(0x80349a45); |
| 9 |
paint.setStyle(SkPaint::kStroke_Style); |
| 10 |
paint.setStrokeWidth(100); |
| 11 |
paint.setStrokeCap(SkPaint::kSquare_Cap); |
| 12 |
canvas->scale(1, 1.2f); |
| 13 |
canvas->drawPoint({64, 96}, paint); |
| 14 |
canvas->scale(.6f, .8f); |
| 15 |
paint.setColor(SK_ColorWHITE); |
| 16 |
canvas->drawPoint(106, 120, paint); |
| 17 |
} |
| 18 |
} // END FIDDLE |