ActiveField - QuickField API help

QuickField Student Edition free download     Contacts

ActiveField Technology

Objects Overview

Hierarchy Chart

How to Start: Application Object

How to work with Problems

How to work with Model

How to work with Data

How to Analyze Results

Objects

Properties

Methods

Rectangle Object

Properties

Methods

Summary

Rectangle with edges parallel to coordinate axes

Details

The Rectangle object represents a plane rectangle with the sides parallel to the axes of co-ordinates. It is used in various methods and properties where the object size is needed or should be set.

Use methods RectangleByLimits or ZeroRectangle of the Application object for the new Rectangle object creation. Each of them creates a new rectangle, with specified or zero size respectively. Once the Rectangle object is created, it may be utilized for many tasks.

Left and Rigth as Double
(read and write)

Left, right, top and bottom boundaries of the rectangle, respectively. All these properties are available for both reading and writing

Coordinate axes direction depends on the way of usage of the rectangle. For example, rectangle created using the property Dimensions of the geometric object or collection, supposes that the axis of ordinates is directed vertically up. Rectangle corresponding to a client area of a window (property ClientArea of the Window object) is designed to work in the window coordinate system, where the axis of ordinates is directed down.

Top and Bottom as Double
(read and write)

TopLeft and BottomRight as Point
(read and write)

Return/set points, related to the upper left and bottom right corners of the rectangle.

CenterPoint as Point
(read only)

Returns the center of the rectangle.

IsEmpty, IsNull as Boolean
(read only)

Degeneration test of the rectangle. The IsEmpty function returns True if the height or width of the rectangle is equal to zero. The IsNull function returns True only in case all coordinates – Right, Left, Top and Bottom are equal to zero.

Width and Height as Double
(read only)

Returns the width or height of the rectangle respectively

Methods Inflate and >> Deflate
change the size of the rectangle

Each of these methods receives 4 parameters: Left, Top, Right and Bottom those values (with sign) define the increase (Inflate) or decrease (Deflate) of the corresponding coordinate of the rectangle

Normalize method

If necessary – swaps left and right or top and bottom boundaries to assure that the left boundary is located to the left (or coincides) from the right boundary, and the bottom boundary is lower (or coincides) than the top boundary.

SetEmpty method

Sets all coordinates of rectangle to zero.

ContainsPoint and ContainsRectangle methods

Check whether given Point (given Rectangle) is located within the rectangle. Points on the boundary are considered as internal ones.

IntersectRect and UnionRect methods

Calculate the rectangle as an intersection (union) of two rectangles.

SetLimits Method

Sets all boundaries on the rectangle at once.