开发者

iphone: draw line with custom brush in Quartz2d

开发者 https://www.devze.com 2023-03-19 01:18 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消