CRect Class
The CRect class encapsulates functionality for a rectangle object used for computing statistics, setting window boundaries, setting up the image cursor for measurements, and plots, and for other uses. The rectangle is described in terms of pixel coordinates.
Construction |
Object = CRect:new() |
Destruction |
Object:delete() |
This class has 4 data members that describe the rectangle. They may be accessed directly; for example, if the class object is R, then the minimum x value is accessed by R.xmin. However, it would be a generally better programming style to access it using the accessor methods Xmin and SetXmin.
xmin |
The minimum x value of the rectangle. |
xmax |
The maximum x value of the rectangle. |
ymin |
The minimum y value of the rectangle. |
ymax |
The maximum y value of the rectangle. |
Creates a new instance of the CRect class. Various constructors are available. |
|
Deletes the instance of the CRect object. |
Returns the 4 data members corresponding to the min and max x and the min and max y of the rectangle. |
|
Returns the maximum x value. |
|
Returns the minimum x value. |
|
Returns the maximum y value. |
|
Returns the minimum y value. |
|
Sets the 4 data members for the x and y limits of the rectangle. |
|
Sets the rectangle to the dimensions of an image. |
|
Sets the maximum x value for the rectangle. |
|
Sets the minimum x value for the rectangle. |
|
Sets the maximum y value for the rectangle. |
|
Sets the minimum y value for the rectangle. |
Returns the height of the rectangle. |
|
Inflates a rectangle by pulling outward on all 4 sides. |
|
Returns a rectangle having the 4 inner dimensions of 2 overlapping rectangles. |
|
Normalizes the CRect so that the minimum is less than the maximum value in each direction. |
|
Offsets a rectangle's sides to move and/or resize it. |
|
Returns true if the specified point x,y is inside the rectangle. |
|
Returns true if the specified point x,y is inside the rectangle. |
|
Returns true if the specified rectangle is completely enclosed with the rectangle. |
|
Returns the width and height of the rectangle. |
|
Returns a rectangle having the 4 outer dimensions of 2 overlapping rectangles. |
|
Returns the width of the rectangle. |
Script Classes, Image Coordinate System, Subpixel Coordinate Definition