Setting A CGContext Transparent Background

后端 未结 8 766
长发绾君心
长发绾君心 2020-12-08 09:15

I am still struggling with drawing a line with CGContext. I have actually go to line to draw, but now I need the background of the Rect to be transparent so the existing ba

8条回答
  •  余生分开走
    2020-12-08 09:50

    CGContextClearRect(context,rect) 
    

    If the provided context is a window or bitmap context, Quartz effectively clears the rectangle. For other context types, Quartz fills the rectangle in a device-dependent manner. However, you should not use this function in contexts other than window or bitmap contexts.

提交回复
热议问题