iphone: draw line with custom brush in Quartz2d
I am writing a drawing application on iPhone. I did the drawing with color and width, with CGContextMoveToPoint and CGContextAddLineToPoint function in Core Graphics. I wonder that can I make a custom style of brush, texture, to change the display style of the line? Because I would like to make the line like开发者_高级运维 pen drawing style. I have checked GLPaint sample code of Apple before but I would like to do that with Core Graphics.
Can you have any idea of my problem? I am very appreciated.
You need to learn about CGPattern drawing and use CGContextSetStrokePattern
精彩评论