iPhone Drawing Application (Not OpenGL)
I'm new to iPhone drawing field. I need to draw simple drawing on iPad. After I clicked button (that I created on same UIView)I need to erase those lines I was drawn.
In short;
Need to Draw a line.--> Click Button---> Erase those lines.
Now I Can draw A Line. But I want to erase those links and I fond useful links, for drawing and for erasing.
Question:
So How can I convert My Drawing image to CGImageRef ?
Is their any learning material fo开发者_运维知识库r this ?
Is there any sample iPhone or iPad project for Drawing and erasing ?
Without Using OpenGl :)
Thank You.
Simple idea to perform erase operation is, set your current brush color to background color and this will virtually implements an eraser tool.
Draw a Line ---> Click on Eraser Button ---> use same paint method with background color(increased brush size)
Most of the drawing apps will use only white color as background, So that if you use white color brush for eraser with the same painting method will act as eraser. But if you use some other backgrounds like images you have to go for other methods.
精彩评论