Function GraEdge() Foundation

Draws parts of a rectangle.

GraEdge( <oPS>, [<aStart>], [<aEnd>], [<nStyle>], [<nElems>] ) --> lSuccess
The argument <oPS> specifies the presentation space to draw the rectangle parts into. For this argument, a "Micro PS" must be requested from an Xbase Part using the method XbpWindow:lockPS(). After the call to GraEdge() completes, the Micro PS must be released with :unlockPS().
<aStart> := {<nX1>, <nY1>}
<aStart> is an array of two elements which determines the coordinates for the lower left corner of the output rectangle. The first element <nX1> designates the x coordinate and the second element <nY1> the y coordinate. If no start point is given, the coordinate {0,0} is assumed.
<aEnd> := {<nX2>, <nY2>}
<aEnd> is an array of two elements which contains the coordinates for the upper right corner of the output rectangle. If no coordinate is passed for <aEnd>, the end point of the output rectangle defaults to the width and height of the window associated with the Micro PS object.
<nStyle> is a numeric value which defines the style of the edge drawn. The following table lists the constants for specifying edge style defined in the file GRA.CH.
Constants for <nStyle>
Constant Description
GRA_EDGESTYLE_SIMPLE Simple edge, no 3D effect
GRA_EDGESTYLE_SUNKEN Edge appears to be sunk into the drawing surface
GRA_EDGESTYLE_RAISED *) Edge appears to be raised above the drawing surface
  1. Default value
<nElems> defines the edge elements to be drawn by GraEdge(). A combination of the following constants defined in the file GRA.CH can be assigned to this parameter.
Constants for <nElems>
Constant Description
GRA_EDGEELEMS_RECT *) Edges form a rectangle
GRA_EDGEELEMS_FILLEDRECT Edges form a filled rectangle
GRA_EDGEELEMS_FLATRECT Edges form a filled rectangle (no 3D effect)
  1. Default value

The return value of GraEdge() is .T. (true) if the operation completes successfully. Otherwise, it is .F. (false).


The function GraEdge() is a graphic primitive which draws parts of a rectangle in a presentation space. GraEdge() is intended primarily for framing objects within the application's user interface. The function neither uses nor updates the current cursor position.

If a visual style is assigned to the Xbase Part associated with the Micro PS, GraEdge() uses the edge definition within the visual style. If no visual style is active or visual styles are disabled for the application, GraEdge() uses compatible imagery.

Visual styles have been introduced with Windows XP and are not available on older platforms.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.