Graphics Properties and Methods

Graphical methods provide the ability to draw on forms and controls. The type of drawing includes points, lines, arcs, chords, pies, ellipses (and circles), and rectangles. As graphical methods and properties are defined in the Window class, they are available for any Form or Control class or subclass instance.

When drawing on a Form class or a BaseControl or Picture control, the drawing positions are relative to the scrolled position. The position for drawing on TextBox, Table, and ListBox controls is not affected by scrolling.

You can access all GUI properties and methods (which are marked as clientExecution methods) from a server method except for anything that brings up a modal type dialog (that is, the common dialog class methods, the app.msgBox, and the showModal and popupMenu methods in the Form class). The other exceptions to this are the app.doWindowEvents, app.checkPictureFile, and app.loadPicture methods, which are executed relative to the server.

Use of GUI methods and properties is very expensive in a server method. A clientExecution method requires that all transient objects passed to the server are passed back with the client execution (and passed back to the server after the client execution is complete). Therefore accessing GUI properties and methods within a server execution should be done only in exceptional circumstances.

When you use the drawFilledRectangle or drawSolidRectangle method to draw a solid rectangle, previous figures that were drawn in the history but are covered and all property settings that have been made redundant are removed. In addition, the drawLine method removes any previous lines with the same co-ordinates where the same width and drawStyle property values apply.

The automatic process does not occur if you use flood-fill, after logic calls to the drawSize method, or if the value of the drawMode property is not DrawMode_Copy (13).

For details about the graphics properties and methods, see "Graphics Properties" and "Graphics Methods", in the following sections.

The form or control properties summarized in the following table also affect the graphical process.

Property Description
backColor Color property of a form or control causes the graphical image to be erased. If the autoRedraw property is set to true, the image is repainted using the new value of the backColor property.
clipControls If the clipControls property of the Form class is set to true, controls are excluded from the painted area of the form or parent control, meaning that the graphics functions are not able to draw over child controls.
scaleHeight Height of the drawing area expressed in the units of the scaleMode property.
scaleLeft Horizontal coordinate of the left edge of the drawing area expressed in the units of the scaleMode property.
scaleTop Vertical coordinate of the top edge of the drawing area expressed in the units of the scaleMode property.
scaleWidth Width of the drawing area expressed in the units of the scaleMode property.
scaleMode Units used to express the dimensions of the drawing area of the form or control (defaults to pixels).