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

Method scanlineIntersections

MyGUIEngine/src/msdfgen/core/edge-segments.cpp:279–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279int LinearSegment::scanlineIntersections(double x[3], int dy[3], double y) const {
280 if ((y >= p[0].y && y < p[1].y) || (y >= p[1].y && y < p[0].y)) {
281 double param = (y-p[0].y)/(p[1].y-p[0].y);
282 x[0] = mix(p[0].x, p[1].x, param);
283 dy[0] = sign(p[1].y-p[0].y);
284 return 1;
285 }
286 return 0;
287}
288
289int QuadraticSegment::scanlineIntersections(double x[3], int dy[3], double y) const {
290 int total = 0;

Callers 2

scanlineMethod · 0.80
orientContoursMethod · 0.80

Calls 4

mixFunction · 0.85
signFunction · 0.85
solveQuadraticFunction · 0.85
solveCubicFunction · 0.85

Tested by

no test coverage detected