CGContext: how do I erase pixels (e.g. kCGBlendModeClear) outside of a bitmap context?
问题 I'm trying to build an eraser tool using Core Graphics, and I'm finding it incredibly difficult to make a performant eraser - it all comes down to: CGContextSetBlendMode(context, kCGBlendModeClear) If you google around for how to "erase" with Core Graphics, almost every answer comes back with that snippet. The problem is it only (apparently) works in a bitmap context. If you're trying to implement interactive erasing, I don't see how kCGBlendModeClear helps you - as far as I can tell, you're