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

Function rasterize

MyGUIEngine/src/msdfgen/core/rasterization.cpp:9–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace msdfgen {
8
9void 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
19void distanceSignCorrection(BitmapSection<float, 1> sdf, const Shape &shape, const Projection &projection, float sdfZeroValue, FillRule fillRule) {
20 sdf.reorient(shape.getYAxisOrientation());

Callers

nothing calls this directly

Calls 7

ProjectionClass · 0.85
getYAxisOrientationMethod · 0.80
scanlineMethod · 0.80
unprojectYMethod · 0.80
filledMethod · 0.80
unprojectXMethod · 0.80
reorientMethod · 0.45

Tested by

no test coverage detected