Package: cairo
Function cairo-path-extents
Lambda Listcairo-path-extents (cr) ArgumentsReturn Value x1 -- a double float for the left of the resulting extents y1 -- a double float for the top of the resulting extents x2 -- a double float for the right of the resulting extents y2 -- a double float for the bottom of the resulting extents Details
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 the cairo-fill-extents and cairo-stroke-extents functions which return the extents of only the area that would be "inked" by the corresponding drawing operations. The result of the cairo-path-extents function is defined as equivalent to the limit of the cairo-stroke-extents function with :round as the line width approaches 0.0, but never reaching the empty-rectangle returned by the cairo-stroke-extents function 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 the cairo-path-extents function. | See also |
2021-12-12