iOS Core Graphics fill inverse of path?

I am drawing a custom shape using CGPathCreateMutable() and CGPathAddArcToPoint. As expected, when I close and fill my path I get the shape which I just drew. However, what I am looking to do is fill the inverse of the path that I have just drawn. That is, if I have drawn a circular path, I want to fill everything except for this circle that I have just drawn.

Is there any way to do an inverse fill? Or another solution would be if I could fill between 2 paths if that is possible? That way I can create a rect path of my bounding frame and then fill between that and my custom path.


If you draw to paths and fill them using Even Odd (EO) fill, that should get you what you want (fill the inner part).

Default fill on OSX (and iPhone) is non zero winding (NZW) fill You could probably get the same effect using non zero winding too, by changing the winding of the different parts accordingly (the 'clockwise' parameter), but using even odd will be much simpler.

Need Your Help

Sage Pay error 5068 : The encryption method is not supported by this protocol version

aes sagepay

I am trying to upgrade sage pay version from 2.22 to 3.00 and I am using Form Intergration to submit the values to Sage. The codes written VB. In 2.2, it was using "SimpleXor encryption algorithm",...

Can't find width element for p in my CSS

html css width tumblr

I'd like a little help understanding what I'm doing wrong in CSS.