Context.pathExtents

Computes a bounding box in user-space coordinates covering the points on the current path. If the current path is empty, returns an empty rectangle ((0,0), (0,0)). Stroke parameters, fill rule, surface dimensions and clipping are not taken into account. Contrast with cairo_fill_extents() and cairo_stroke_extents() which return the extents of only the area that would be "inked" by the corresponding drawing operations. The result of cairo_path_extents() is defined as equivalent to the limit of cairo_stroke_extents() with CAIRO_LINE_CAP_ROUND as the line width approaches 0.0, (but never reaching the empty-rectangle returned by cairo_stroke_extents() for a line width of 0.0). Specifically, this means that zero-area sub-paths such as cairo_move_to();cairo_line_to() segments, (even degenerate cases where the coordinates to both calls are identical), will be considered as contributing to the extents. However, a lone cairo_move_to() will not contribute to the results of cairo_path_extents(). Since 1.6

class Context
void
pathExtents
(
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

Meta