krzysztofzablocki / LineDrawing

Beatiful and fast smooth line drawing algorithm for iOS - as seen in Foldify.
http://twitter.com/merowing_
Other
1.29k stars 213 forks source link

Drawing with different style pens #4

Closed tolgatanriverdi closed 11 years ago

tolgatanriverdi commented 12 years ago

Hello You know the paper by 53 application and it has different type of pen,pencils etc...(Such as sketch pen,coloring pen..) Do you think implementing something like it would be possible with your algorithm? If it is possible can you show me a way so may be I can implement and share it with you so your codes grows bigger.

krzysztofzablocki commented 11 years ago

Most pen effects in apps are based on brush bitmap, that would require geting rid of overdraw part of the algorithm and instead basing antialiasing on brush bitmap, that way you could change brush bitmap and have different effects, like chalk etc.

tolgatanriverdi commented 11 years ago

is it possible to give some example link for that because it didnt seem so clear to me

tolgatanriverdi commented 11 years ago

By the way while I was thinking your solution , some strange cases occured to me.You said I have to use texture folor brush painting however what about the cases of intersection point of more than one color.For example I draw an area with yellow color and then paint some red on it normally it should be orange color but if I use texture it will be the last drawing color in my case it will be red? How can I solve that kind of problem? Or should I have to use something other than texture

krzysztofzablocki commented 11 years ago

Well that really depends on blending mode, you can use textured brush and mix colors without any problems. It's just a matter of blending mode you use ;)

tolgatanriverdi commented 11 years ago

can you give me an example about that? if its possible of course