Recti

From Silhouette Wiki
Revision as of 15:26, 23 June 2014 by Paul (talk | contribs) (→‎Methods)
Jump to navigation Jump to search

A Recti is a 2D integer rectangle, usually in pixel coordinates.

Attributes

Name Description
empty True if right=left and bottom=top (read-only)
left Left edge
top Top edge
right Right edge
bottom Bottom edge
width Rectangle width (right - left)
height Rectangle height (bottom - top)
valid True if the rectangle is valid (right>left, bottom>top) (read-only)

Methods

Name Description
Recti(left, top, right=-1, bottom=-1, width=-1, height=-1) Constructs a new Rectangle. Use argument names to indicate right,bottom or width,height.
clip(other) Returns a new Recti with this clipped to other