Context.fillExtents

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

Contrast with cairo.context.Context.pathExtents, which is similar, but returns non-zero extents for some paths with no inked area, (such as a simple line segment).

Note that cairo.context.Context.fillExtents must necessarily do more work to compute the precise inked areas in light of the fill rule, so cairo.context.Context.pathExtents may be more desirable for sake of performance if the non-inked path extents are desired.

See cairo.context.Context.fill, cairo.context.Context.setFillRule and cairo.context.Context.fillPreserve.

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