Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
strokefill.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkFont.h"
#include "include/core/SkFontStyle.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkRect.h"
#include "include/core/SkScalar.h"
#include "include/core/SkString.h"
#include "include/core/SkTypeface.h"
#include "include/core/SkTypes.h"
#include "src/core/SkPathPriv.h"
#include "src/core/SkTextFormatParams.h"
#include "tools/ToolUtils.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (bug339297, canvas, 640, 480)
 
 DEF_SIMPLE_GM (bug339297_as_clip, canvas, 640, 480)
 
 DEF_SIMPLE_GM (bug6987, canvas, 200, 200)
 

Function Documentation

◆ DEF_SIMPLE_GM() [1/3]

DEF_SIMPLE_GM ( bug339297  ,
canvas  ,
640  ,
480   
)

Definition at line 24 of file strokefill.cpp.

24 {
26 path.moveTo(-469515, -10354890);
27 path.cubicTo(771919.62f, -10411179, 2013360.1f, -10243774, 3195542.8f, -9860664);
28 path.lineTo(3195550, -9860655);
29 path.lineTo(3195539, -9860652);
30 path.lineTo(3195539, -9860652);
31 path.lineTo(3195539, -9860652);
32 path.cubicTo(2013358.1f, -10243761, 771919.25f, -10411166, -469513.84f, -10354877);
33 path.lineTo(-469515, -10354890);
34 path.close();
35
36 canvas->translate(258, 10365663);
37
39 paint.setAntiAlias(true);
40 paint.setColor(SK_ColorBLACK);
42 canvas->drawPath(path, paint);
43
44 paint.setColor(SK_ColorRED);
46 paint.setStrokeWidth(1);
47 canvas->drawPath(path, paint);
48}
constexpr SkColor SK_ColorRED
Definition SkColor.h:126
constexpr SkColor SK_ColorBLACK
Definition SkColor.h:103
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
@ kFill_Style
set to fill geometry
Definition SkPaint.h:193
const Paint & paint
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switches.h:57

◆ DEF_SIMPLE_GM() [2/3]

DEF_SIMPLE_GM ( bug339297_as_clip  ,
canvas  ,
640  ,
480   
)

Definition at line 50 of file strokefill.cpp.

50 {
52 path.moveTo(-469515, -10354890);
53 path.cubicTo(771919.62f, -10411179, 2013360.1f, -10243774, 3195542.8f, -9860664);
54 path.lineTo(3195550, -9860655);
55 path.lineTo(3195539, -9860652);
56 path.lineTo(3195539, -9860652);
57 path.lineTo(3195539, -9860652);
58 path.cubicTo(2013358.1f, -10243761, 771919.25f, -10411166, -469513.84f, -10354877);
59 path.lineTo(-469515, -10354890);
60 path.close();
61
62 canvas->translate(258, 10365663);
63
64 canvas->save();
65 canvas->clipPath(path, true);
66 canvas->clear(SK_ColorBLACK);
67 canvas->restore();
68
70 paint.setAntiAlias(true);
72 paint.setColor(SK_ColorRED);
74 paint.setStrokeWidth(1);
75 canvas->drawPath(path, paint);
76}

◆ DEF_SIMPLE_GM() [3/3]

DEF_SIMPLE_GM ( bug6987  ,
canvas  ,
200  ,
200   
)

Definition at line 78 of file strokefill.cpp.

78 {
81 paint.setStrokeWidth(0.0001f);
82 paint.setAntiAlias(true);
84 canvas->save();
85 canvas->scale(50000.0f, 50000.0f);
86 path.moveTo(0.0005f, 0.0004f);
87 path.lineTo(0.0008f, 0.0010f);
88 path.lineTo(0.0002f, 0.0010f);
89 path.close();
90 canvas->drawPath(path, paint);
91 canvas->restore();
92}