Home
last modified time | relevance | path

Searched refs:contour (Results 1 – 25 of 95) sorted by relevance

1234

/external/fonttools/Lib/fontTools/pens/
DreverseContourPen.py17 def filterContour(self, contour): argument
18 return reversedContour(contour)
21 def reversedContour(contour): argument
25 if not contour:
30 assert len(contour) > 1, "invalid contour"
33 contourType = contour.pop()[0]
37 firstType, firstPts = contour.pop(0)
45 assert not contour, (
50 if not contour:
58 lastType, lastPts = contour[-1]
[all …]
DpointPen.py249 self.contour = None
254 for pt, segmentType in self.contour:
259 self.contour = []
260 self.contour.append((pt, "move"))
263 assert self.contour is not None, "contour missing required initial moveTo"
264 self.contour.append((pt, "line"))
267 assert self.contour is not None, "contour missing required initial moveTo"
269 self.contour.append((pt, None))
270 self.contour.append((pts[-1], "curve"))
274 self.contour = []
[all …]
/external/skia/src/pathops/
DSkPathOpsCommon.cpp69 SkOpContour* contour = contourHead; in FindUndone() local
71 if (contour->done()) { in FindUndone()
74 SkOpSpan* result = contour->undoneSpan(); in FindUndone()
78 } while ((contour = contour->next())); in FindUndone()
156 SkOpContour* contour = *contourList; in SortContourList() local
158 if (contour->count()) { in SortContourList()
159 contour->setOppXor(contour->operand() ? evenOdd : oppEvenOdd); in SortContourList()
160 *list.append() = contour; in SortContourList()
162 } while ((contour = contour->next())); in SortContourList()
170 contour = list[0]; in SortContourList()
[all …]
DSkPathOpsAsWinding.cpp204 int nextEdge(Contour& contour, Edge edge) { in nextEdge() argument
212 if (++verbCount < contour.fVerbStart) { in nextEdge()
215 if (verbCount >= contour.fVerbEnd) { in nextEdge()
232 winding += contains_edge(pts, verb, conic_weight(iter, verb), contour.fMinXY); in nextEdge()
238 if (minXY.fX > contour.fMinXY.fX) { in nextEdge()
241 if (minXY.fX == contour.fMinXY.fX) { in nextEdge()
242 if (minXY.fY != contour.fMinXY.fY) { in nextEdge()
245 if (direction == contour.fDirection) { in nextEdge()
254 contour.fMinXY = minXY; in nextEdge()
255 contour.fDirection = direction; in nextEdge()
[all …]
DSkOpEdgeBuilder.cpp58 SkOpContour* contour = fContourBuilder.contour(); in finish() local
59 if (contour && !contour->count()) { in finish()
60 fContoursHead->remove(contour); in finish()
175 SkOpContour* contour = fContourBuilder.contour(); in walk() local
184 if (contour && contour->count()) { in walk()
191 if (!contour) { in walk()
192 fContourBuilder.setContour(contour = fContoursHead->appendContour()); in walk()
194 contour->init(fGlobalState, fOperand, in walk()
330 SkASSERT(contour); in walk()
334 contour = nullptr; in walk()
[all …]
DSkOpContour.h320 void setNext(SkOpContour* contour) { in setNext() argument
322 fNext = contour; in setNext()
393 SkOpContour* contour = this->globalState()->allocator()->make<SkOpContour>(); in appendContour() local
394 contour->setNext(nullptr); in appendContour()
400 prev->setNext(contour); in appendContour()
401 return contour; in appendContour()
414 void remove(SkOpContour* contour) { in remove() argument
415 if (contour == this) { in remove()
419 SkASSERT(contour->next() == nullptr); in remove()
422 while ((next = prev->next()) != contour) { in remove()
[all …]
DSkOpEdgeBuilder.h38 SkOpContour* contour = fContourBuilder.contour(); in complete() local
39 if (contour && contour->count()) { in complete()
40 contour->complete(); in complete()
DSkIntersectionHelper.h42 SkOpContour* contour() const { in contour() function
43 return fSegment->contour(); in contour()
46 void init(SkOpContour* contour) { in init() argument
47 fSegment = contour->first(); in init()
DSkPathOpsWinding.cpp253 SkOpContour* contour = contourHead; in sortableTop() local
255 if (!contour->count()) { in sortableTop()
258 contour->rayCheck(hitBase, dir, &hitHead, &allocator); in sortableTop()
259 } while ((contour = contour->next())); in sortableTop()
357 hitSegment->contour()->setCcw(ccw); in sortableTop()
414 SkOpContour* contour = contourHead; in FindSortableTop() local
416 if (contour->done()) { in FindSortableTop()
419 SkOpSpan* result = contour->findSortableTop(contourHead); in FindSortableTop()
423 } while ((contour = contour->next())); in FindSortableTop()
/external/skqp/src/pathops/
DSkPathOpsCommon.cpp69 SkOpContour* contour = contourHead; in FindUndone() local
71 if (contour->done()) { in FindUndone()
74 SkOpSpan* result = contour->undoneSpan(); in FindUndone()
78 } while ((contour = contour->next())); in FindUndone()
156 SkOpContour* contour = *contourList; in SortContourList() local
158 if (contour->count()) { in SortContourList()
159 contour->setOppXor(contour->operand() ? evenOdd : oppEvenOdd); in SortContourList()
160 *list.append() = contour; in SortContourList()
162 } while ((contour = contour->next())); in SortContourList()
170 contour = list[0]; in SortContourList()
[all …]
DSkPathOpsAsWinding.cpp207 int nextEdge(Contour& contour, Edge edge) { in nextEdge() argument
215 if (++verbCount < contour.fVerbStart) { in nextEdge()
218 if (verbCount >= contour.fVerbEnd) { in nextEdge()
235 winding += contains_edge(pts, verb, conic_weight(iter, verb), contour.fMinXY); in nextEdge()
241 if (minXY.fX > contour.fMinXY.fX) { in nextEdge()
244 if (minXY.fX == contour.fMinXY.fX) { in nextEdge()
245 if (minXY.fY != contour.fMinXY.fY) { in nextEdge()
248 if (direction == contour.fDirection) { in nextEdge()
257 contour.fMinXY = minXY; in nextEdge()
258 contour.fDirection = direction; in nextEdge()
[all …]
DSkOpEdgeBuilder.cpp54 SkOpContour* contour = fContourBuilder.contour(); in finish() local
55 if (contour && !contour->count()) { in finish()
56 fContoursHead->remove(contour); in finish()
181 SkOpContour* contour = fContourBuilder.contour(); in walk() local
190 if (contour && contour->count()) { in walk()
197 if (!contour) { in walk()
198 fContourBuilder.setContour(contour = fContoursHead->appendContour()); in walk()
200 contour->init(fGlobalState, fOperand, in walk()
336 SkASSERT(contour); in walk()
340 contour = nullptr; in walk()
[all …]
DSkOpContour.h321 void setNext(SkOpContour* contour) { in setNext() argument
323 fNext = contour; in setNext()
394 SkOpContour* contour = this->globalState()->allocator()->make<SkOpContour>(); in appendContour() local
395 contour->setNext(nullptr); in appendContour()
401 prev->setNext(contour); in appendContour()
402 return contour; in appendContour()
415 void remove(SkOpContour* contour) { in remove() argument
416 if (contour == this) { in remove()
420 SkASSERT(contour->next() == nullptr); in remove()
423 while ((next = prev->next()) != contour) { in remove()
[all …]
DSkOpEdgeBuilder.h38 SkOpContour* contour = fContourBuilder.contour(); in complete() local
39 if (contour && contour->count()) { in complete()
40 contour->complete(); in complete()
DSkIntersectionHelper.h42 SkOpContour* contour() const { in contour() function
43 return fSegment->contour(); in contour()
46 void init(SkOpContour* contour) { in init() argument
47 fSegment = contour->first(); in init()
DSkPathOpsWinding.cpp252 SkOpContour* contour = contourHead; in sortableTop() local
254 if (!contour->count()) { in sortableTop()
257 contour->rayCheck(hitBase, dir, &hitHead, &allocator); in sortableTop()
258 } while ((contour = contour->next())); in sortableTop()
356 hitSegment->contour()->setCcw(ccw); in sortableTop()
413 SkOpContour* contour = contourHead; in FindSortableTop() local
415 if (contour->done()) { in FindSortableTop()
418 SkOpSpan* result = contour->findSortableTop(contourHead); in FindSortableTop()
422 } while ((contour = contour->next())); in FindSortableTop()
/external/skqp/tests/
DPathOpsDebug.cpp239 const SkOpAngle* ContourAngle(SkOpContour* contour, int id) { in ContourAngle() argument
240 return contour->debugAngle(id); in ContourAngle()
243 SkOpContour* ContourContour(SkOpContour* contour, int id) { in ContourContour() argument
244 return contour->debugContour(id); in ContourContour()
247 const SkOpPtT* ContourPtT(SkOpContour* contour, int id) { in ContourPtT() argument
248 return contour->debugPtT(id); in ContourPtT()
251 const SkOpSegment* ContourSegment(SkOpContour* contour, int id) { in ContourSegment() argument
252 return contour->debugSegment(id); in ContourSegment()
255 const SkOpSpanBase* ContourSpan(SkOpContour* contour, int id) { in ContourSpan() argument
256 return contour->debugSpan(id); in ContourSpan()
[all …]
DPathOpsAngleTest.cpp243 SkOpContourHead contour; in DEF_TEST() local
244 SkOpGlobalState state(&contour, &allocator SkDEBUGPARAMS(false) SkDEBUGPARAMS(nullptr)); in DEF_TEST()
245 contour.init(&state, false, false); in DEF_TEST()
253 contour.addLine(data.fShortPts); in DEF_TEST()
256 contour.addQuad(data.fShortPts); in DEF_TEST()
259 contour.addCubic(data.fShortPts); in DEF_TEST()
263 SkOpSegment* first = contour.first(); in DEF_TEST()
435 SkOpContourHead contour; in DEF_TEST() local
436 SkOpGlobalState state(&contour, &allocator SkDEBUGPARAMS(false) SkDEBUGPARAMS(nullptr)); in DEF_TEST()
437 contour.init(&state, false, false); in DEF_TEST()
[all …]
/external/skia/tests/
DPathOpsDebug.cpp239 const SkOpAngle* ContourAngle(SkOpContour* contour, int id) { in ContourAngle() argument
240 return contour->debugAngle(id); in ContourAngle()
243 SkOpContour* ContourContour(SkOpContour* contour, int id) { in ContourContour() argument
244 return contour->debugContour(id); in ContourContour()
247 const SkOpPtT* ContourPtT(SkOpContour* contour, int id) { in ContourPtT() argument
248 return contour->debugPtT(id); in ContourPtT()
251 const SkOpSegment* ContourSegment(SkOpContour* contour, int id) { in ContourSegment() argument
252 return contour->debugSegment(id); in ContourSegment()
255 const SkOpSpanBase* ContourSpan(SkOpContour* contour, int id) { in ContourSpan() argument
256 return contour->debugSpan(id); in ContourSpan()
[all …]
DPathOpsAngleTest.cpp242 SkOpContourHead contour; in DEF_TEST() local
243 SkOpGlobalState state(&contour, &allocator SkDEBUGPARAMS(false) SkDEBUGPARAMS(nullptr)); in DEF_TEST()
244 contour.init(&state, false, false); in DEF_TEST()
252 contour.addLine(data.fShortPts); in DEF_TEST()
255 contour.addQuad(data.fShortPts); in DEF_TEST()
258 contour.addCubic(data.fShortPts); in DEF_TEST()
262 SkOpSegment* first = contour.first(); in DEF_TEST()
438 SkOpContourHead contour; in DEF_TEST() local
439 SkOpGlobalState state(&contour, &alloc SkDEBUGPARAMS(false) SkDEBUGPARAMS(nullptr)); in DEF_TEST()
440 contour.init(&state, false, false); in DEF_TEST()
[all …]
/external/fonttools/Tests/pens/
DreverseContourPen_test.py306 def test_reverse_pen(contour, expected): argument
309 for operator, operands in contour:
315 def test_reverse_point_pen(contour, expected): argument
323 for operator, operands in contour:
332 if (contour and contour[-1][0] == "closePath" and
333 contour[1][0] == "lineTo" and contour[1][1] != contour[0][1]):
334 expected = expected[:-1] + [("lineTo", contour[0][1])] + expected[-1:]
/external/sfntly/cpp/src/sfntly/table/truetype/
Dglyph_table.cc388 for (uint32_t contour = 0; contour < contour_index_.size() - 1; ++contour) { in Initialize() local
389 contour_index_[contour + 1] = ContourEndPoint(contour) + 1; in Initialize()
482 int32_t GlyphTable::SimpleGlyph::ContourEndPoint(int32_t contour) { in ContourEndPoint() argument
483 return data_->ReadUShort(contour * DataSize::kUSHORT + in ContourEndPoint()
524 int32_t GlyphTable::CompositeGlyph::Flags(int32_t contour) { in Flags() argument
525 if (contour < 0 || static_cast<size_t>(contour) >= contour_index_.size()) in Flags()
527 return data_->ReadUShort(contour_index_[contour]); in Flags()
534 int32_t GlyphTable::CompositeGlyph::GlyphIndex(int32_t contour) { in GlyphIndex() argument
535 if (contour < 0 || static_cast<size_t>(contour) >= contour_index_.size()) in GlyphIndex()
537 return data_->ReadUShort(DataSize::kUSHORT + contour_index_[contour]); in GlyphIndex()
/external/freetype/src/autofit/
Dafhints.c322 AF_Point* contour = hints->contours; in af_glyph_hints_dump_points() local
323 AF_Point* climit = contour + hints->num_contours; in af_glyph_hints_dump_points()
352 if ( contour < climit && *contour == point ) in af_glyph_hints_dump_points()
355 contour++; in af_glyph_hints_dump_points()
944 AF_Point* contour = hints->contours; in af_glyph_hints_reload() local
945 AF_Point* contour_limit = contour + hints->num_contours; in af_glyph_hints_reload()
950 for ( ; contour < contour_limit; contour++, end++ ) in af_glyph_hints_reload()
952 contour[0] = points + idx; in af_glyph_hints_reload()
972 AF_Point* contour; in af_glyph_hints_reload() local
976 for ( contour = hints->contours; contour < contour_limit; contour++ ) in af_glyph_hints_reload()
[all …]
/external/fonttools/Lib/fontTools/ufoLib/
DglifLib.py1274 def _buildOutlineContourFormat1(pen, contour, validate): argument
1275 if validate and contour.attrib:
1278 if len(contour):
1279 …massaged = _validateAndMassagePointStructures(contour, pointAttributesFormat1, openContourOffCurve…
1283 def _buildOutlinePointsFormat1(pen, contour): argument
1284 for point in contour:
1323 def _buildOutlineContourFormat2(pen, contour, identifiers, validate): argument
1325 for attr in contour.attrib.keys():
1328 identifier = contour.get("identifier")
1341 if len(contour):
[all …]
/external/skia/src/gpu/
DGrTriangulator.cpp363 void GrTriangulator::appendPointToContour(const SkPoint& p, VertexList* contour) const { in appendPointToContour()
369 contour->append(v); in appendPointToContour()
384 VertexList* contour) const { in appendQuadraticToContour()
402 this->appendPointToContour(to_point(quad.eval(j * u)), contour); in appendQuadraticToContour()
407 const SkPoint& p3, SkScalar tolSqd, VertexList* contour, in generateCubicPoints() argument
413 this->appendPointToContour(p3, contour); in generateCubicPoints()
427 this->generateCubicPoints(p0, q[0], r[0], s, tolSqd, contour, pointsLeft); in generateCubicPoints()
428 this->generateCubicPoints(s, r[1], q[2], p3, tolSqd, contour, pointsLeft); in generateCubicPoints()
438 VertexList* contour = contours; in pathToContours() local
446 contour++; in pathToContours()
[all …]

1234