Go to the source code of this file.
◆ REG_FIDDLE()
REG_FIDDLE |
( |
Anti_Alias |
, |
|
|
512 |
, |
|
|
256 |
, |
|
|
false |
, |
|
|
0 |
|
|
) |
| |
Definition at line 4 of file Anti_Alias.cpp.
4 {
7 bitmap.allocN32Pixels(50, 50);
11 paint.setStrokeWidth(10);
12 for (bool antialias : { false, true }) {
14 paint.setAntiAlias(antialias);
16 offscreen.drawLine(5, 5, 15, 30,
paint);
19 canvas->
scale(10, 10);
23 }
24}
25}
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