GPDrawingArea

Unit : GPDAreaUnit
Association : GPDrawingAreaAsn
Inherits from : None

Description

An area on the screen that can be drawn on by using GPShapes. A GPDrawingArea contains a default GPDrawingStyle used for all drawing. Methods for this class allow the user to get a link to this GPDrawingStyle and make changes to it, give the GPDrawingArea a link to a different GPDrawingStyle to use, or make a copy of the current GPDrawingStyle (contained by the GPDrawingArea).

Public Interface

CONSTRUCTOR Init (containerLink: GPManagerAsn);
Initializes a GPDrawingArea (with default size 300 pixels square).

CONSTRUCTOR InitWithSize (containerLink: GPManagerAsn; width, height: integer);
Initializes a GPDrawingArea with given width and height (in pixels).

DESTRUCTOR Destroy; VIRTUAL;
Destroys a GPDrawingArea.

PROCEDURE SetDrawingStyle (style: GPDrawingStyleAsn);
Sets the drawing style to be used when drawing objects.

FUNCTION GetDrawingStyle: GPDrawingStyleAsn;
Returns a link to the current drawing style.

PROCEDURE CopyDrawingStyle (VAR style: GPDrawingStyle);
Returns in style a copy of the current drawing style.

PROCEDURE AddInteractor (interactorLink: GPMouseInteractorAsn);
Adds a mouse interactor to the drawing area.

PROCEDURE RemoveInteractor (interactorLink: GPMouseInteractorAsn);
Removes a mouse interactor from the drawing area.

PROCEDURE SetHeight (height: integer);
Sets the height of the drawing area.

PROCEDURE SetWidth (width: integer);
Sets the width of the drawing area.

FUNCTION GetHeight : integer;
Returns the height of the drawing area.

FUNCTION GetWidth : integer;
Returns the width of the drawing area.

PROCEDURE Clear (color : GPColor);
Clears the GPDrawingArea using color as the background color.

FUNCTION ColorAtMatches (x, y : integer; color: GPColor): Boolean;
Returns TRUE if the color at location specified by pt matches color.

Subclasses

None

Please report any problems with GP or the documentation to GP Support .


GP Home Page GP Documentation
Loring Holden