43 : fPaintStyle(paintStyle)
44 , fPathEffect(
std::move(pe)) {}
50 constexpr SkScalar kIntervals[] = { 4.f, 3.f };
77const SkScalar slideWidth = 90, slideHeight = 90;
83 SkScalar cx = slideWidth / 2 + slideBoundary;
84 SkScalar cy = slideHeight / 2 + slideBoundary;
86 SkScalar dy = slideHeight + 2 * slideBoundary;
89 slideBoundary + slideWidth,
90 slideBoundary + slideHeight);
100 for (
size_t styleIndex = 0; styleIndex <
std::size(styles);
102 for (
size_t sizeIndex = 0; sizeIndex <
std::size(pathSizes);
108 for (
size_t widthIndex = 0;
112 paint.setColor(0xff007000);
113 paint.setStrokeWidth(strokeWidths[widthIndex]);
114 paint.setStyle(styles[styleIndex].fPaintStyle);
115 paint.setPathEffect(styles[styleIndex].fPathEffect);
117 for (
size_t pathIndex = 0;
120 canvas->drawRect(
clipRect, clipPaint);
130 canvas->drawPath(
path, outlinePaint);
133 canvas->translate(
dx, 0);
137 canvas->translate(0, dy);
148 canvas->clipRect({0, 0, 128, 128});
155 canvas->drawRect({0, 0, 128, 128},
stroke);
159 paint.setAntiAlias(
true);
163 canvas->translate(128, 0);
167 canvas->translate(128, 0);
168 paint.setImageFilter(
nullptr);
182 canvas->drawPath(
path, strokePaint);
189 canvas->translate(51, 0);
192 path.setFillType(fillType);
193 canvas->drawPath(
path, fillPaint);
199 canvas->drawRect(
clipRect, clipPaint);
static sk_sp< SkPathEffect > make_dash()
@ kNormal_SkBlurStyle
fuzzy inside and outside
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorWHITE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
void setStyle(Style style)
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
@ kStrokeAndFill_Style
sets to stroke and fill geometry
void setMaskFilter(sk_sp< SkMaskFilter > maskFilter)
void setStrokeWidth(SkScalar width)
static SkPath Rect(const SkRect &, SkPathDirection=SkPathDirection::kCW, unsigned startIndex=0)
static SkPath Circle(SkScalar center_x, SkScalar center_y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)
static SkPath Line(const SkPoint a, const SkPoint b)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
static SkPath generate_circle(SkScalar cx, SkScalar cy, SkScalar d)
static SkPath generate_line(SkScalar cx, SkScalar cy, SkScalar l)
static SkPath generate_square(SkScalar cx, SkScalar cy, SkScalar w)
static SkPath generate_rect_line(SkScalar cx, SkScalar cy, SkScalar l)
DEF_SIMPLE_GM(inverse_paths, canvas, 800, 1200)
clipRect(r.rect, r.opAA.op(), r.opAA.aa())) template<> void Draw
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
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
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)