Go to the source code of this file.
◆ REG_FIDDLE()
REG_FIDDLE |
( |
Anti_Alias |
, |
|
|
512 |
, |
|
|
256 |
, |
|
|
false |
, |
|
|
0 |
|
|
) |
| |
Definition at line 5 of file Anti_Alias.cpp.
5 {
8 bitmap.allocN32Pixels(50, 50);
12 paint.setStrokeWidth(10);
13 for (bool antialias : { false, true }) {
15 paint.setAntiAlias(antialias);
17 offscreen.drawLine(5, 5, 15, 30,
paint);
20 canvas->
scale(10, 10);
24 }
25}
26}
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void translate(SkScalar dx, SkScalar dy)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
@ kStroke_Style
set to stroke geometry