Method Cairo.Context()->stroke_extents()
- Method
stroke_extents
array
(float
) stroke_extents()- Description
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 stroke_extents() will return an empty rectangle. Contrast with path_extents() which can be used to compute the non-empty bounds as the line width approaches zero.
Note that stroke_extents() must necessarily do more work to compute the precise inked areas in light of the stroke parameters, so path_extents() may be more desirable for sake of performance if non-inked path extents are desired.
- Returns
an array with coordinates for the left, top, right, and bottom, respectively, of the resulting extents
- See also
stroke(), set_line_width(), set_line_join(), set_line_cap(), set_dash(), and stroke_preserve().