Context.strokeExtends

Computes a bounding box in user coordinates covering the area that would be affected, (the "inked" area), by a stroke() operation given the current path and stroke parameters. If the current path is empty, returns an empty rectangle ((0,0), (0,0)). Surface dimensions and clipping are not taken into account.

Note that if the line width is set to exactly zero, then strokeExtents() will return an empty rectangle. Contrast with pathExtents() which can be used to compute the non-empty bounds as the line width approaches zero.

Note that strokeExtents() must necessarily do more work to compute the precise inked areas in light of the stroke parameters, so pathExtents() may be more desirable for sake of performance if non-inked path extents are desired.

See stroke(), setLineWidth(), setLineJoin(), setLineCap(), set_dash(), and strokePreserve().

struct Context
strokeExtends
()

Meta