开发者

How change a CGContext attribute after drawRect is carried out

开发者 https://www.devze.com 2022-12-30 20:07 出处:网络
I draw a path using CGContext. How can I later change one of the path attributes aft开发者_运维知识库er drawRect was carried out (completed)? I want to be able to change the color of my path accordi

I draw a path using CGContext.

How can I later change one of the path attributes aft开发者_运维知识库er drawRect was carried out (completed)? I want to be able to change the color of my path according to a slider value.


defined the property and added [setNeedsDisplay] during property change did the deed ...


To set color use this function

CGContextSetRGBFillColor(context, RED, GREEN, BLUE, ALPHA);

where RED, GREEN, BLUE, ALPHA, stands for float values from 0 to 1

0

精彩评论

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