Objective C: Using UIImage for Stroking
Posted
by
SeongHo
on Stack Overflow
See other posts from Stack Overflow
or by SeongHo
Published on 2011-11-28T01:43:10Z
Indexed on
2011/11/28
1:50 UTC
Read the original article
Hit count: 181
I am trying to apply a texture for my brush but i'm really having a hard time figuring how it is done.
Here's the image of my output.
I used an UIImage that just follows the touch on the screen but when i swipe it faster the result is on the right side "W", and on the left side that's the result when i swipe it slow.
i tried using the CGContextMoveToPoint
and CGContextAddLineToPoint
i don't know how apply the texture.
Is it possible to use UIImage for the stroke texture?
Here's my code
UIImage * brushImageTexture = [UIImage imageNamed:@"brushImage.png"];
[brushImagetexture drawAtPoint:CGPointMake(touchCurrentPosition.x, touchVurrentPosition.y) blendMode:blendMode alpha:1.0f];
© Stack Overflow or respective owner