CoreGraphics 的CGPath 定义了一个枚举值
typedef CF_ENUM(int32_t, CGLineCap) {
kCGLineCapButt,
kCGLineCapRound,
kCGLineCapSquare
};
kCGLineCapButt
A line with a squared-off end. Quartz draws the line to extend only to the exact endpoint of the path. This is the default.
该属性值指定不绘制端点, 线条结尾处直接结束。这是默认值。
kCGLineCapRound
A line with a rounded end. Quartz draws the line to extend beyond the endpoint of the path. The line ends with a semicircular arc with a radius of 1/2 the line’s width, centered on the endpoint.
该属性值指定绘制圆形端点, 线条结尾处绘制一个直径为线条宽度的半圆
kCGLineCapSquare
A line with a squared-off end. Quartz extends the line beyond the endpoint of the path for a distance equal to half the line widt
该属性值指定绘制方形端点。
线条结尾处绘制半个边长为线条宽度的正方形。需要
说明的是,这种形状的端点与“butt”形状的端点十分相似,
只是采用这种形式的端点的线条略长一点而已
苹果开发群 :414319235 欢迎加入,共同学习