| 7 | namespace msdfgen { |
| 8 | |
| 9 | void rasterize(BitmapSection<float, 1> output, const Shape &shape, const Projection &projection, FillRule fillRule) { |
| 10 | output.reorient(shape.getYAxisOrientation()); |
| 11 | Scanline scanline; |
| 12 | for (int y = 0; y < output.height; ++y) { |
| 13 | shape.scanline(scanline, projection.unprojectY(y+.5)); |
| 14 | for (int x = 0; x < output.width; ++x) |
| 15 | *output(x, y) = (float) scanline.filled(projection.unprojectX(x+.5), fillRule); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | void distanceSignCorrection(BitmapSection<float, 1> sdf, const Shape &shape, const Projection &projection, float sdfZeroValue, FillRule fillRule) { |
| 20 | sdf.reorient(shape.getYAxisOrientation()); |
nothing calls this directly
no test coverage detected