rectangle(
TOP
,
LEFT
,
BOTTOM
,
RIGHT
)

The rectangle( function defines a rectangle from four dimensions.


Parameters

This function has four parameters:

top – is the position of the top edge of the rectangle. (Unlike standard cartesian co-ordinates, positive is down and negative is up.)

left – is the position of the left edge of the rectangle. (Like standard cartesian co-ordinates, positive is right and negative is left.)

bottom – is the position of the bottom edge of the rectangle. (Unlike standard cartesian co-ordinates, positive is down and negative is up.)

right – is the position of the right edge of the rectangle. (Like standard cartesian co-ordinates, positive is right and negative is left.)


Description

The rectangle( function defines a rectangle from four dimensions. A rectangle is 32 bytes of raw binary data (see Binary Data, Graphic Coordinates). Panorama has many functions and statements that use rectangles for working with graphic elements.

The procedure below creates a rectangle that is 4 points high and 6 points wide.

local MyRectangle
MyRectangle=rectangle(7,6,11,12)

Here is a magnified view of what this rectangle would look like if it was displayed on the screen:

rectangle(7,6,11,12)
rectangle(7,6,11,12)

Error Messages

rectangle( must have positive width. – The top of the rectangle must be above the bottom of the rectangle.

rectangle( must have positive height. – The left edge of the rectangle must be to the left of the right edge of the rectangle.


See Also


History

VersionStatusNotes
10.0UpdatedUnlike Panorama 6 and earlier, the parameters to this function are floating point values instead of integers (it will also accept integers). Also, the rectangle produced by this function is a 32 byte binary value, instead of an 8 byte text value.