• Home
  • Raw
  • Download

Lines Matching refs:dir

46 static int xy_index(SkOpRayDir dir) {  in xy_index()  argument
47 return static_cast<int>(dir) & 1; in xy_index()
50 static SkScalar pt_xy(const SkPoint& pt, SkOpRayDir dir) { in pt_xy() argument
51 return (&pt.fX)[xy_index(dir)]; in pt_xy()
54 static SkScalar pt_yx(const SkPoint& pt, SkOpRayDir dir) { in pt_yx() argument
55 return (&pt.fX)[!xy_index(dir)]; in pt_yx()
58 static double pt_dxdy(const SkDVector& v, SkOpRayDir dir) { in pt_dxdy() argument
59 return (&v.fX)[xy_index(dir)]; in pt_dxdy()
62 static double pt_dydx(const SkDVector& v, SkOpRayDir dir) { in pt_dydx() argument
63 return (&v.fX)[!xy_index(dir)]; in pt_dydx()
66 static SkScalar rect_side(const SkRect& r, SkOpRayDir dir) { in rect_side() argument
67 return (&r.fLeft)[static_cast<int>(dir)]; in rect_side()
70 static bool sideways_overlap(const SkRect& rect, const SkPoint& pt, SkOpRayDir dir) { in sideways_overlap() argument
71 int i = !xy_index(dir); in sideways_overlap()
75 static bool less_than(SkOpRayDir dir) { in less_than() argument
76 return static_cast<bool>((static_cast<int>(dir) & 2) == 0); in less_than()
79 static bool ccw_dxdy(const SkDVector& v, SkOpRayDir dir) { in ccw_dxdy() argument
80 bool vPartPos = pt_dydx(v, dir) > 0; in ccw_dxdy()
81 bool leftBottom = ((static_cast<int>(dir) + 1) & 2) != 0; in ccw_dxdy()
105 void SkOpContour::rayCheck(const SkOpRayHit& base, SkOpRayDir dir, SkOpRayHit** hits, in rayCheck() argument
108 SkScalar baseXY = pt_xy(base.fPt, dir); in rayCheck()
109 SkScalar boundsXY = rect_side(fBounds, dir); in rayCheck()
110 bool checkLessThan = less_than(dir); in rayCheck()
116 testSegment->rayCheck(base, dir, hits, allocator); in rayCheck()
120 void SkOpSegment::rayCheck(const SkOpRayHit& base, SkOpRayDir dir, SkOpRayHit** hits, in rayCheck() argument
122 if (!sideways_overlap(fBounds, base.fPt, dir)) { in rayCheck()
125 SkScalar baseXY = pt_xy(base.fPt, dir); in rayCheck()
126 SkScalar boundsXY = rect_side(fBounds, dir); in rayCheck()
127 bool checkLessThan = less_than(dir); in rayCheck()
132 SkScalar baseYX = pt_yx(base.fPt, dir); in rayCheck()
133 int roots = (*CurveIntercept[fVerb * 2 + xy_index(dir)])(fPts, fWeight, baseYX, tVals); in rayCheck()
155 SkScalar ptXY = pt_xy(pt, dir); in rayCheck()
168 if (fabs(pt_dydx(slope, dir) * 10000) > fabs(pt_dxdy(slope, dir))) { in rayCheck()
242 SkOpRayDir dir = hitBase.makeTestBase(this, t); in sortableTop() local
247 dir = static_cast<SkOpRayDir>(static_cast<int>(dir) + dirOffset); in sortableTop()
249 && !pt_dydx(hitBase.fSlope, dir)) { in sortableTop()
257 contour->rayCheck(hitBase, dir, &hitHead, &allocator); in sortableTop()
267 SkTQSort(sorted.begin(), sorted.end() - 1, xy_index(dir) in sortableTop()
268 ? less_than(dir) ? hit_compare_y : reverse_hit_compare_y in sortableTop()
269 : less_than(dir) ? hit_compare_x : reverse_hit_compare_x); in sortableTop()
273 gDebugRayDirName[static_cast<int>(dir)], hitBase.fSpan->segment()->debugID(), in sortableTop()
280 bool ccw = ccw_dxdy(hit->fSlope, dir); in sortableTop()
298 bool ccw = ccw_dxdy(hit->fSlope, dir); in sortableTop()