tags:

views:

120

answers:

1

I am a beginner working on paint application on iphone.

adding new tool for my iphone App called airbrush...

which will spray on UIImageView. can any one help me out how to work with it.

+1  A: 

I think you might be looking for CGContextBeginPath and its related functions. I am not quite sure how to define a new stroke but I imagine it can be handled with something like [UIColor colorFromImage:myImage]. You should look into Quartz 2D, try looking here.

/Thomas

Thomas Børlum
Thanks Thomas.....Is there any method, to draw line like chalk.
kiran
It's not going to be a walk in the park. You should be able to make a custom pen (stroke) somehow using the Quartz 2D API. If you cannot find the functionality in the API for that, my best guess would be that you can load an image (round white for chalk) and continuously paint it to the image when a user touches the image. You are going to have to use `touchesBegan:withEvent:` on an UIResponder or you can make a Gesture Recognizers: http://developer.apple.com/iphone/library/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/GestureRecognizers/GestureRecognizers.html
Thomas Børlum
thanks ......Thomas....
kiran
Thanks Thomas.......Its Working.......I used UIBezierpath...I got my airbrush :D
kiran
and drawn it on touchesBegan and touchesMoved....Too
kiran
Great! Good luck with the rest of your app.
Thomas Børlum
Thanks Thomas....Now i am adding new tool for my application .. "Smudge brush" is any document regarding smudge. I need to raise a new question for smudge brush.
kiran