Context.strokeExtents

Computes a bounding box in user coordinates covering the area that would be affected, (the "inked" area), by a cairo_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 cairo_stroke_extents() will return an empty rectangle. Contrast with cairo_path_extents() which can be used to compute the non-empty bounds as the line width approaches zero. Note that cairo_stroke_extents() must necessarily do more work to compute the precise inked areas in light of the stroke parameters, so cairo_path_extents() may be more desirable for sake of performance if non-inked path extents are desired. See cairo_stroke(), cairo_set_line_width(), cairo_set_line_join(), cairo_set_line_cap(), cairo_set_dash(), and cairo_stroke_preserve(). Since 1.0

class Context
void
strokeExtents
(
out double x1
,
out double y1
,
out double x2
,
out double y2
)

Parameters

x1 double

left of the resulting extents

y1 double

top of the resulting extents

x2 double

right of the resulting extents

y2 double

bottom of the resulting extents