Skip to main content

stroke_border

Function stroke_border 

Source
pub fn stroke_border(
    shape: InsettableShape,
    color: u64,
    line_width: f64,
) -> ViewHandle
Expand description

.strokeBorder(_:lineWidth:antialiased:) on an InsettableShape.

Not .stroke: a stroke straddles the shape’s edge, a border is inset so it falls entirely inside. The difference is half the line width everywhere.

Two overloads share the name. The older returns some View and is exported; the newer returns a concrete StrokeBorderShapeView and is @_alwaysEmitIntoClient, and it is the one Swift picks — so matching what a reference builds means building that type’s value rather than calling either.