Name
cairo.Region -- create region
Synopsis
reg = cairo.Region([rects])
Function
Allocates a new region object and optionally initializes it to the union of all given rects. If specified, the rects parameter must be a table containing an arbitrary number of subtables describing a rectangle each. The subtables need to have the fields x, y, width, height initialized. If the rects parameter is omitted, an empty region will be created.

This function returns a newly allocated Cairo region. Free with cregion:Free(). This function always returns a valid handle; 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 cregion:Status().

Inputs
rects
optional: table of rectangles to initialize the region with
Results
reg
a newly allocated Cairo region

Show TOC