What do you use in iOS instead of ClearRect?

Hey all,

I want to clear a canvas or an area of one. On desktop, you use graphics.clearrect. The iOSGraphics class has no such method. So what do you use instead? I’ve tried saving the state when first drawing the canvas and then recalling that state when I want to clear the canvas back to what it was. But that doesn’t seem to work.

So kinda stuck.

Did you try a FillRect with Color.Clear instead?
If that does not work, adding the Declare would take a few steps but is not that awful. Sorry I don’t have time right now, but you should be able to find the definitions for a CGRect/NSRect structure and add

Declare Sub CGContextClearRect Lib "CoreGraphics.framework" (CFTypeRef as Ptr, Rect as CGRect)

which you should call on the iOSGraphics.handle.