LavishNav:Rect (Region Type)

From Lavish Software Wiki
Jump to navigation Jump to search


What is a Rect?

A rect is a rectangle with a given size in 2 dimensions (X and Y). The 3rd dimension (Z) is generally ignored.

Rect Behaviors


A rect contains a given point if the point is within the bounds of the defined rectangle.

Nearest Point

If the rect contains the given point, the nearest point will be that point. Otherwise, the nearest point within this region to a given point will be a point on the edge of the rect that is closest to the given point in 2 dimensions. The Z coordinate of the nearest point is the Z coordinate of the given point.

Center Point

The center point within this region is halfway between X1 and X2, and Y1 and Y2. The Z coordinate is 0.

Rect Characteristics

Rects are descendants of the base region type. Any characteristics of the base region type may be applied in addition to the rect-specific characteristics described below.

Rect-Specific Properties

  • X1
X1-coordinate. Defaults to 0.
  • X2
X2-coordinate. Defaults to 0.
  • Y1
Y1-coordinate. Defaults to 0.
  • Y2
Y2-coordinate. Defaults to 0.

Programming with rects

lnavrect Object Type
Rect class


Example XML code

<Rect Name="Rectacular">

See Also