Currently I am unable to get clips working correctly. Replace, and Exclude works perfectly. But Intersect acts the same as Union and Complement acts the same as Exclude.
Is Asobo aware of this? Below image is a sample "dirty" code to test it using the gdi+ wrapper (The result would be the same even if you use nvg directly.)
1.Rect 1 is drawn 300x300 using Pink Color
2.SetClip is called for 300x300 Replace Operation
3.SetClip is called for 100x100 Intersect Operation.
4. Rect 1 is drawn again 300 x300 using White Color
5. Result should be only the 100x100 white area. However, as you can see from the image capture, it is simply a union operation on the clip, remaining 300x300. If I use a replace clip, to replace the entire clip section, the result will be what I want, but intersect is needed for masking operations of more complex figures.