36 , fInitialDashLength(-1)
37 , fInitialDashIndex(0)
38 , fIntervalLength(0) {
45 fIntervals[
i] = intervals[
i];
50 &fInitialDashLength, &fInitialDashIndex, &fIntervalLength, &fPhase);
60 fInitialDashLength, fInitialDashIndex, fIntervalLength,
72 rect->outset(radius, radius);
81 if (
nullptr == cullRect) {
89 if ((
dx && dy) || (!
dx && !dy)) {
118 if (maxX <= bounds.fLeft || minX >=
bounds.fRight) {
126 if (minX <
bounds.fLeft) {
129 if (maxX >
bounds.fRight) {
151 if (maxY <= bounds.fTop || minY >=
bounds.fBottom) {
162 if (maxY >
bounds.fBottom) {
203 if (!
src.isLine(pts)) {
213 if (!
matrix.rectStaysRect()) {
255 if (clampedInitialDashLength > 0 || 0 == fInitialDashIndex) {
256 SkASSERT(len2 >= clampedInitialDashLength);
257 if (0 == fInitialDashIndex) {
258 if (clampedInitialDashLength > 0) {
259 if (clampedInitialDashLength >= fIntervals[0]) {
262 len2 -= clampedInitialDashLength;
264 len2 -= fIntervals[1];
269 len2 -= clampedInitialDashLength;
275 SkScalar numIntervals = len2 / fIntervalLength;
281 len2 -= numMidPoints * fIntervalLength;
282 bool partialLast =
false;
284 if (len2 < fIntervals[0]) {
297 if (clampedInitialDashLength > 0 || 0 == fInitialDashIndex) {
300 if (0 == fInitialDashIndex) {
301 if (clampedInitialDashLength > 0) {
314 if (clampedInitialDashLength < fIntervals[0]) {
317 x + halfWidth,
y + halfHeight);
319 SkASSERT(curPt < results->fNumPoints);
324 distance += clampedInitialDashLength;
329 distance += clampedInitialDashLength;
333 if (0 != numMidPoints) {
336 for (
int i = 0;
i < numMidPoints; ++
i) {
340 SkASSERT(curPt < results->fNumPoints);
366 x + halfWidth,
y + halfHeight);
377 if (
info->fCount >= fCount &&
info->fIntervals) {
378 memcpy(
info->fIntervals, fIntervals, fCount *
sizeof(
SkScalar));
380 info->fCount = fCount;
381 info->fPhase = fPhase;
387 buffer.writeScalar(fPhase);
388 buffer.writeScalarArray(fIntervals, fCount);
401 if (
buffer.readScalarArray(intervals.get(),
count)) {
static SkM44 inv(const SkM44 &m)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static constexpr bool SkIsAlign2(T x)
static void outset_for_stroke(SkRect *rect, const SkStrokeRec &rec)
static bool cull_line(SkPoint *pts, const SkStrokeRec &rec, const SkMatrix &ctm, const SkRect *cullRect, const SkScalar intervalLength)
static bool SkIsFinite(T x, Pack... values)
SK_API void sk_free(void *)
static void * sk_malloc_throw(size_t size)
void swap(sk_sp< T > &a, sk_sp< T > &b)
#define SkScalarInvert(x)
#define SkScalarMod(x, y)
static bool SkScalarNearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance=SK_ScalarNearlyZero)
static bool SkScalarIsInt(SkScalar x)
#define SkScalarFloorToInt(x)
constexpr int SkToInt(S x)
SkDashImpl(const SkScalar intervals[], int count, SkScalar phase)
void flatten(SkWriteBuffer &) const override
DashType onAsADash(DashInfo *info) const override
bool onAsPoints(PointData *results, const SkPath &src, const SkStrokeRec &, const SkMatrix &, const SkRect *) const override
bool onFilterPath(SkPath *dst, const SkPath &src, SkStrokeRec *, const SkRect *, const SkMatrix &) const override
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
bool invert(SkMatrix *inverse) const
bool rectStaysRect() const
@ kButt_Cap
no stroke extension
@ kMiter_Join
extends to miter limit
@ kDash_DashType
fills in all of the info parameter
SkPath & addRect(const SkRect &rect, SkPathDirection dir, unsigned start)
SkScalar getWidth() const
SkPaint::Join getJoin() const
SkPaint::Cap getCap() const
SkScalar getMiter() const
static float min(float r, float g, float b)
const SkScalar kMaxDashCount
bool InternalFilter(SkPath *dst, const SkPath &src, SkStrokeRec *rec, const SkRect *cullRect, const SkScalar aIntervals[], int32_t count, SkScalar initialDashLength, int32_t initialDashIndex, SkScalar intervalLength, SkScalar startPhase, StrokeRecApplication=StrokeRecApplication::kAllow)
void CalcDashParameters(SkScalar phase, const SkScalar intervals[], int32_t count, SkScalar *initialDashLength, int32_t *initialDashIndex, SkScalar *intervalLength, SkScalar *adjustedPhase=nullptr)
bool ValidDashPath(SkScalar phase, const SkScalar intervals[], int32_t count)
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
sk_sp< SkBlender > blender SkRect rect
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 to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
void set(float x, float y)
static float Distance(const SkPoint &a, const SkPoint &b)
void scale(float scale, SkPoint *dst) const
constexpr float y() const
constexpr float x() const