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

Function interpretFillRule

MyGUIEngine/src/msdfgen/core/Scanline.cpp:13–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11}
12
13bool interpretFillRule(int intersections, FillRule fillRule) {
14 switch (fillRule) {
15 case FILL_NONZERO:
16 return intersections != 0;
17 case FILL_ODD:
18 return intersections&1;
19 case FILL_POSITIVE:
20 return intersections > 0;
21 case FILL_NEGATIVE:
22 return intersections < 0;
23 }
24 return false;
25}
26
27double Scanline::overlap(const Scanline &a, const Scanline &b, double xFrom, double xTo, FillRule fillRule) {
28 double total = 0;

Callers 2

overlapMethod · 0.85
filledMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected