| 115 | } |
| 116 | |
| 117 | void 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 | |
| 137 | int Shape::edgeCount() const { |
| 138 | int total = 0; |
no test coverage detected