Continuing the discussion from Nanovg SetClip operations do not work correctly:
I am back with a new test case that does not work properly. (PS: I still do not have time to validate the previous “fixes”, busy with other parts of the projects.)
Using gdip wrapper API here.
- Create Path with geometry.
- Clear Surface with Green.
- Use Path as Clip.
- FillRect (large rect that covers entire gauge) with white brush on whole surface to test clip.
- Clip does not work as shown.
For sanity check to check if my paths are valid:
- Create Path with geometry.
- Clear Surface with Green.
- FillPath with white brush.
You can clearly see the path geometry is valid and shows up properly. I suspect the stencil surface used in nanovg is not behaving properly. Please check as clips are essential for complex avionics gauges.
Compass.cpp (8.8 KB)
Attached is the sample code. Toggle between the two test cases by chaging the if statement true/false condition. @FlyingRaccoon
Thanks.