Flutter Engine
The Flutter Engine
Functions
crbug_1113794.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkPathEffect.h"
#include "include/effects/SkDashPathEffect.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (crbug_1113794, canvas, 600, 200)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( crbug_1113794  ,
canvas  ,
600  ,
200   
)

Definition at line 15 of file crbug_1113794.cpp.

15 {
16 SkPath path = SkPath::Line({50.f, 80.f}, {50.f, 20.f});
17
19 paint.setColor(SK_ColorBLACK);
20 paint.setAntiAlias(true);
21 paint.setStrokeWidth(0.25f);
23
24 static constexpr SkScalar kDash[2] = {10.f, 10.f};
25 paint.setPathEffect(SkDashPathEffect::Make(kDash, 2, 0.f));
26
27 SkMatrix viewBox = SkMatrix::RectToRect(SkRect::MakeWH(100, 100), SkRect::MakeWH(600, 200));
28 canvas->concat(viewBox);
29
30 canvas->drawPath(path, paint);
31}
constexpr SkColor SK_ColorBLACK
Definition: SkColor.h:103
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
static SkMatrix RectToRect(const SkRect &src, const SkRect &dst, ScaleToFit mode=kFill_ScaleToFit)
Definition: SkMatrix.h:157
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
Definition: SkPath.h:59
static SkPath Line(const SkPoint a, const SkPoint b)
Definition: SkPath.h:106
const Paint & paint
Definition: color_source.cc:38
float SkScalar
Definition: extension.cpp:12
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
static constexpr SkRect MakeWH(float w, float h)
Definition: SkRect.h:609