Flutter Engine
The Flutter Engine
Functions
FillPathWithPaint_2.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (FillPathWithPaint_2, 256, 128, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( FillPathWithPaint_2  ,
256  ,
128  ,
false  ,
 
)

Definition at line 4 of file FillPathWithPaint_2.cpp.

4 {
5void draw(SkCanvas* canvas) {
8 paint.setStrokeWidth(10);
10 strokePath.moveTo(20, 20);
11 strokePath.lineTo(100, 100);
12 canvas->drawPath(strokePath, paint);
13 SkPath fillPath;
15 paint.setStrokeWidth(2);
16 canvas->translate(40, 0);
17 canvas->drawPath(fillPath, paint);
18}
19} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
void drawPath(const SkPath &path, const SkPaint &paint)
Definition: SkCanvas.cpp:1747
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
Definition: SkPath.h:59
const Paint & paint
Definition: color_source.cc:38
static void strokePath(SkCanvas *canvas, const SkPath &path)
SK_API bool FillPathWithPaint(const SkPath &src, const SkPaint &paint, SkPath *dst, const SkRect *cullRect, SkScalar resScale=1)
Definition: SkPathUtils.cpp:23