27#include <initializer_list>
40 paint->setPathEffect(compose);
44 paint->setStrokeWidth(0);
48 paint->setStrokeWidth(0);
53 paint->setStrokeWidth(12);
58 SkScalar inter[] = { 20, 10, 10, 10 };
59 paint->setStrokeWidth(12);
64constexpr int gXY[] = {
654, 0, 0, -4, 8, -4, 12, 0, 8, 4, 0, 4
71 return path.makeTransform(
m);
93 paint->setPathEffect(
nullptr);
124 paint.setAntiAlias(
true);
144 SkRect r = { 0, 0, 250, 120 };
159 p.setAntiAlias(
true);
168 using INHERITED =
GM;
171DEF_GM(
return new PathEffectGM; )
187 StrokeLineInflated(
float strokeWidth,
float pxInflate)
188 : fRadius(
strokeWidth / 2.f), fPxInflate(pxInflate) {}
190 bool onNeedsCTM() const final {
return true; }
201 if (!ctm.invert(&invCtm)) {
218 dst->moveTo(pts[0] + n);
219 dst->lineTo(pts[1] + n);
220 dst->lineTo(pts[1] - n);
221 dst->lineTo(pts[0] - n);
238 const float fPxInflate;
259 const float pxInflate = 0.5f;
263 path.moveTo(100, 100);
264 path.lineTo(200, 200);
268 paint.setAntiAlias(
true);
270 paint.setPathEffect(pathEffect);
274 canvas->
scale(2.5, 0.5f);
280 paint.setPathEffect(
nullptr);
287 canvas->
scale(2.5, 0.5f);
293 using INHERITED =
GM;
static const int strokeWidth
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
constexpr SkColor SK_ColorBLUE
static constexpr SkColor SkColorSetA(SkColor c, U8CPU a)
constexpr SkColor SK_ColorGREEN
#define SK_FLATTENABLE_HOOKS(type)
sk_sp< T > sk_ref_sp(T *obj)
SkISize getISize() override
DrawResult onGpuSetup(SkCanvas *canvas, SkString *, GraphiteTestContext *) override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
void translate(SkScalar dx, SkScalar dy)
virtual GrRecordingContext * recordingContext() const
void drawIRect(const SkIRect &rect, const SkPaint &paint)
void drawPath(const SkPath &path, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
static sk_sp< SkPathEffect > Make(SkScalar radius)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
static sk_sp< SkPathEffect > Make(SkScalar segLength, SkScalar dev, uint32_t seedAssist=0)
virtual void flatten(SkWriteBuffer &) const
void mapVector(SkScalar dx, SkScalar dy, SkVector *result) const
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
static sk_sp< SkPathEffect > Make(const SkPath &path, SkScalar advance, SkScalar phase, Style)
static sk_sp< SkPathEffect > Make(const SkMatrix &matrix, const SkPath &path)
SkPathBuilder & addRect(const SkRect &, SkPathDirection, unsigned startIndex)
SkPathBuilder & addOval(const SkRect &, SkPathDirection, unsigned startIndex)
virtual bool onNeedsCTM() const
virtual bool computeFastBounds(SkRect *bounds) const =0
virtual bool onFilterPath(SkPath *, const SkPath &, SkStrokeRec *, const SkRect *, const SkMatrix &) const =0
static sk_sp< SkPathEffect > MakeCompose(sk_sp< SkPathEffect > outer, sk_sp< SkPathEffect > inner)
static SkPath Circle(SkScalar center_x, SkScalar center_y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)
static SkPath Polygon(const SkPoint pts[], int count, bool isClosed, SkPathFillType=SkPathFillType::kWinding, bool isVolatile=false)
GM(SkColor backgroundColor=SK_ColorWHITE)
void onDraw(SkCanvas *canvas) override
SkString getName() const override
SkISize getISize() override
Optional< SkRect > bounds
sk_sp< SkBlender > blender SkRect rect
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
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
void(* PE_Proc)(SkPaint *)
static void hair_pe(SkPaint *paint)
static void compose_pe(SkPaint *paint)
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static void one_d_pe(SkPaint *paint)
static void dash_pe(SkPaint *paint)
static void hair2_pe(SkPaint *paint)
static sk_sp< SkPathEffect > MakeTileEffect()
static SkPath scale(const SkPath &path, SkScalar scale)
static void fill_pe(SkPaint *paint)
static void tile_pe(SkPaint *paint)
static void discrete_pe(SkPaint *paint)
static void stroke_pe(SkPaint *paint)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static constexpr SkISize Make(int32_t w, int32_t h)
bool setLength(float length)
SkRect makeInset(float dx, float dy) const