Lines Matching refs:segments
66 static bool center_of_mass(const SegmentArray& segments, SkPoint* c) { in center_of_mass() argument
69 int count = segments.count(); in center_of_mass()
75 p0 = segments[0].endPt(); in center_of_mass()
81 pj = segments[1].endPt() - p0; in center_of_mass()
84 pj = segments[i + 1].endPt() - p0; in center_of_mass()
99 const SkPoint& pt = segments[i].endPt(); in center_of_mass()
116 static bool compute_vectors(SegmentArray* segments, in compute_vectors() argument
121 if (!center_of_mass(*segments, fanPt)) { in compute_vectors()
124 int count = segments->count(); in compute_vectors()
138 Segment& sega = (*segments)[a]; in compute_vectors()
140 Segment& segb = (*segments)[b]; in compute_vectors()
162 const Segment& sega = (*segments)[a]; in compute_vectors()
164 Segment& segb = (*segments)[b]; in compute_vectors()
238 SegmentArray* segments) { in add_line_to_segment() argument
239 segments->push_back(); in add_line_to_segment()
240 segments->back().fType = Segment::kLine; in add_line_to_segment()
241 segments->back().fPts[0] = pt; in add_line_to_segment()
245 SegmentArray* segments) { in add_quad_segment() argument
248 add_line_to_segment(pts[2], segments); in add_quad_segment()
251 segments->push_back(); in add_quad_segment()
252 segments->back().fType = Segment::kQuad; in add_quad_segment()
253 segments->back().fPts[0] = pts[1]; in add_quad_segment()
254 segments->back().fPts[1] = pts[2]; in add_quad_segment()
260 SegmentArray* segments) { in add_cubic_segments() argument
265 add_quad_segment(&quads[q], segments); in add_cubic_segments()
271 SegmentArray* segments, in get_segments() argument
302 add_line_to_segment(pts[1], segments); in get_segments()
311 add_quad_segment(pts, segments); in get_segments()
323 add_quad_segment(quadPts + 2*i, segments); in get_segments()
334 add_cubic_segments(pts, dir, segments); in get_segments()
342 return compute_vectors(segments, fanPt, dir, vCount, iCount); in get_segments()
358 static void create_vertices(const SegmentArray& segments, in create_vertices() argument
371 int count = segments.count(); in create_vertices()
373 const Segment& sega = segments[a]; in create_vertices()
375 const Segment& segb = segments[b]; in create_vertices()
764 SkSTArray<kPreallocSegmentCnt, Segment, true> segments; in onPrepareDraws() local
767 if (!get_segments(*pathPtr, *viewMatrix, &segments, &fanPt, &vertexCount, in onPrepareDraws()
794 create_vertices(segments, fanPt, color, &draws, verts, idxs, kVertexStride); in onPrepareDraws()