MCPcopy Create free account
hub / github.com/MyGUI/mygui / scanline

Method scanline

MyGUIEngine/src/msdfgen/core/Shape.cpp:117–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void Shape::scanline(Scanline &line, double y) const {
118 std::vector<Scanline::Intersection> intersections;
119 double x[3];
120 int dy[3];
121 for (std::vector<Contour>::const_iterator contour = contours.begin(); contour != contours.end(); ++contour) {
122 for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
123 int n = (*edge)->scanlineIntersections(x, dy, y);
124 for (int i = 0; i < n; ++i) {
125 Scanline::Intersection intersection = { x[i], dy[i] };
126 intersections.push_back(intersection);
127 }
128 }
129 }
130#ifdef MSDFGEN_USE_CPP11
131 line.setIntersections((std::vector<Scanline::Intersection> &&) intersections);
132#else
133 line.setIntersections(intersections);
134#endif
135}
136
137int Shape::edgeCount() const {
138 int total = 0;

Callers 4

estimateSDFErrorInnerFunction · 0.80
rasterizeFunction · 0.80
distanceSignCorrectionFunction · 0.80

Calls 5

scanlineIntersectionsMethod · 0.80
setIntersectionsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected