Enumeration

CGLineCap

Styles for rendering the endpoint of a stroked line.

Declaration

typedef enum CGLineCap : int32_t {
    ...
} CGLineCap;

Overview

A line cap specifies the method used by CGContextStrokePath to draw the endpoint of the line. To change the line cap style in a graphics context, you use the function CGContextSetLineCap.

Topics

Constants

kCGLineCapButt

A line with a squared-off end. Core Graphics draws the line to extend only to the exact endpoint of the path. This is the default.

kCGLineCapRound

A line with a rounded end. Core Graphics 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. Core Graphics extends the line beyond the endpoint of the path for a distance equal to half the line width.