Package: cairo

Function cairo:region-create-rectangle

Lambda List

cairo:region-create-rectangle (x y width height)

Arguments

x -- an integer for the x coordinate of the left side of the rectangle
y -- an integer for the y coordinate of the top side of the rectangle
width -- an integer for the width of the rectangle
height -- an integer for the height of the rectangle

Return Value

The newly allocated cairo:region-t instance.

Details

Allocates a new cairo:region-t instance containing the given rectangle. Free with the cairo:region-destroy function. This function always returns a valid instance. If memory cannot be allocated, then a special error object is returned where all operations on the object do nothing. You can check for this with the cairo:region-status function.

Examples

(defvar rect (cairo:region-create-rectangle 10 20 100 200))
=> RECT
(cairo:region-status rect)
=> :SUCCESS
(cairo:region-extents rect)
=> (10 20 100 200)    
 

See also

2025-1-26