2021-12-25

/** Path drawing functions. **/

typedef CF_ENUM (int32_t, CGPathDrawingMode) {

kCGPathFill,//只有填充(非零缠绕数填充),不绘制边框 如图1

kCGPathEOFill,//奇偶规则填充(多条路径交叉时,奇数交叉填充,偶交叉不填充)如图2

kCGPathStroke, // 只有边框 如图3

kCGPathFillStroke, // 既有边框又有填充 如图4

kCGPathEOFillStroke // 奇偶填充并绘制边框 如图5

};

图1
image

图2
image

图3
image

图4
image

图5
image

/*

使用指定模式绘制当前CGContextRef中所包含的路径。CGPathDrawingMode 属性如上*/

void CGContextDrawPath(CGContextRef__nullable c, CGPathDrawingMode mode)

你可能感兴趣的:(2021-12-25)