Lines Matching full:phase

19 static SkScalar find_first_interval(const SkScalar intervals[], SkScalar phase,  in find_first_interval()  argument
23 if (phase > gap || (phase == gap && gap)) { in find_first_interval()
24 phase -= gap; in find_first_interval()
27 return gap - phase; in find_first_interval()
30 // If we get here, phase "appears" to be larger than our length. This in find_first_interval()
38 void SkDashPath::CalcDashParameters(SkScalar phase, const SkScalar intervals[], int32_t count, in CalcDashParameters() argument
46 // Adjust phase to be between 0 and len, "flipping" phase if negative. in CalcDashParameters()
47 // e.g., if len is 100, then phase of -20 (or -120) is equivalent to 80 in CalcDashParameters()
49 if (phase < 0) { in CalcDashParameters()
50 phase = -phase; in CalcDashParameters()
51 if (phase > len) { in CalcDashParameters()
52 phase = SkScalarMod(phase, len); in CalcDashParameters()
54 phase = len - phase; in CalcDashParameters()
56 // Due to finite precision, it's possible that phase == len, in CalcDashParameters()
57 // even after the subtract (if len >>> phase), so fix that here. in CalcDashParameters()
59 SkASSERT(phase <= len); in CalcDashParameters()
60 if (phase == len) { in CalcDashParameters()
61 phase = 0; in CalcDashParameters()
63 } else if (phase >= len) { in CalcDashParameters()
64 phase = SkScalarMod(phase, len); in CalcDashParameters()
66 *adjustedPhase = phase; in CalcDashParameters()
68 SkASSERT(phase >= 0 && phase < len); in CalcDashParameters()
70 *initialDashLength = find_first_interval(intervals, phase, in CalcDashParameters()
124 // right/bottom of the bounds (keeping our new line "in phase" with the dash, in clip_line()
130 minXY -= priorPhase; // for rectangles, adjust by prior phase in clip_line()
136 maxXY += priorPhase; // for rectangles, adjust by prior phase in clip_line()
211 // keep track of all prior lengths to set phase of next line in cull_path()
456 bool SkDashPath::ValidDashPath(SkScalar phase, const SkScalar intervals[], int32_t count) { in ValidDashPath() argument
468 return length > 0 && SkScalarIsFinite(phase) && SkScalarIsFinite(length); in ValidDashPath()