• Home
  • Raw
  • Download

Lines Matching refs:segments

69 bool center_of_mass(const SegmentArray& segments, SkPoint* c) {  in center_of_mass()  argument
72 int count = segments.count(); in center_of_mass()
78 p0 = segments[0].endPt(); in center_of_mass()
84 pj = segments[1].endPt() - p0; in center_of_mass()
87 pj = segments[i + 1].endPt() - p0; in center_of_mass()
102 const SkPoint& pt = segments[i].endPt(); in center_of_mass()
119 bool compute_vectors(SegmentArray* segments, in compute_vectors() argument
124 if (!center_of_mass(*segments, fanPt)) { in compute_vectors()
127 int count = segments->count(); in compute_vectors()
141 Segment& sega = (*segments)[a]; in compute_vectors()
143 Segment& segb = (*segments)[b]; in compute_vectors()
165 const Segment& sega = (*segments)[a]; in compute_vectors()
167 Segment& segb = (*segments)[b]; in compute_vectors()
247 inline void add_line_to_segment(const SkPoint& pt, SegmentArray* segments) { in add_line_to_segment() argument
248 segments->push_back(); in add_line_to_segment()
249 segments->back().fType = Segment::kLine; in add_line_to_segment()
250 segments->back().fPts[0] = pt; in add_line_to_segment()
253 inline void add_quad_segment(const SkPoint pts[3], SegmentArray* segments) { in add_quad_segment() argument
256 add_line_to_segment(pts[2], segments); in add_quad_segment()
259 segments->push_back(); in add_quad_segment()
260 segments->back().fType = Segment::kQuad; in add_quad_segment()
261 segments->back().fPts[0] = pts[1]; in add_quad_segment()
262 segments->back().fPts[1] = pts[2]; in add_quad_segment()
268 SegmentArray* segments) { in add_cubic_segments() argument
273 add_quad_segment(&quads[q], segments); in add_cubic_segments()
279 SegmentArray* segments, in get_segments() argument
309 add_line_to_segment(pts[1], segments); in get_segments()
318 add_quad_segment(pts, segments); in get_segments()
330 add_quad_segment(quadPts + 2*i, segments); in get_segments()
341 add_cubic_segments(pts, dir, segments); in get_segments()
349 return compute_vectors(segments, fanPt, dir, vCount, iCount); in get_segments()
365 void create_vertices(const SegmentArray& segments, in create_vertices() argument
377 int count = segments.count(); in create_vertices()
379 const Segment& sega = segments[a]; in create_vertices()
381 const Segment& segb = segments[b]; in create_vertices()
794 SkSTArray<kPreallocSegmentCnt, Segment, true> segments; in onPrepareDraws() local
797 if (!get_segments(*pathPtr, *viewMatrix, &segments, &fanPt, &vertexCount, in onPrepareDraws()
826 create_vertices(segments, fanPt, color, &draws, verts, idxs, kVertexStride); in onPrepareDraws()