Rect


Section contents


Overview

Defined in

ce32base.oxh


Construction / destruction


NewRect - Constructor

Usage

this& = NewRect&:(X1&,Y1&,X2&,Y2&)

Description

Creates a rectangle object and returns a handle which allows the object to be manipulated.

Parameters
X1& The X co-ordinate of the left side of the rectnagle.
Y1& The Y co-ordinate of the top side of the rectangle
X2& The X co-ordinate of the right side of the rectangle
Y2& The Y co-ordinate of the bottom of the rectangle
Return Value
this& An value which represents the created rectangle
Error Handling

If the object could not be created then an error is generated which should be trapped by an ONERR handler.

Example
  LOCAL this&

  this& = NewRect&:(50,50,20,20)
  DeleteRect:(this&) 

DeleteRect - Destructor

Usage

DeleteRect:(BYREF this&)

Description

Destroys the rectangle object.

Arguments
this& A handle to a rectangle object
Example
  LOCAL this&

  this& = NewRect&:(50,50,20,20)
  DeleteRect:(this&) 

Methods provided


RectAssign

Usage

this& = RectAssign&:(this&,rect&)

Description

Assigns the rectangle in rect& to the rectangle in this& and returns the handle this&.

Arguments
this& A handle to a rectangle object
rect& A handle to a rectangle objec
Return value
this& A handle to a rectangle object

RectEQ

Usage

result% = RectEQ%:(this&,rect&)

Description

Compares the 2 rectangle for equality.

Arguments
this& A handle to a rectangle object
rect& A handle to a rectangle objec
Return value
result% Returns -1 (true) if the rectangles described by this& and rect& are the same, otherwise returns 0

RectNE

Usage

result% = RectNE%:(this&,rect&)

Description

Compares the 2 rectangle for inequality.

Arguments
this& A handle to a rectangle object
rect& A handle to a rectangle objec
Return value
result% Returns -1 (true) if the rectangles described by this& and rect& are not the same, otherwise returns 0

RectSetRect

Usage

RectSetRect:(this&,X1&,Y1,X2&,Y2&)

Description

Set the rectangle from (X1&,Y1&) to (X2&,Y2&)..

Arguments
this& A handle to a rectangle object
X1& The X co-ordinate of the left of the rectangle
Y1& The Y co-ordinate of the top of the rectangle
X2& The X co-ordinate of the right of the rectangle
Y2& The Y co-ordinate of the bottom of the rectangle