Function GraMarker() Foundation

Displays a marker (point).

Syntax
GraMarker( [<oPS>], [<aPoint>] ) --> lSuccess
Parameters
<oPS>
The argument <oPS> specifies the presentation space in which a marker is drawn. If the current window is an XbpCrt window, <oPS>is optional. If it is NIL, the return value of SetAppWindow():presSpace() is used. In all other cases <oPS> is not optional. It must be created either using XbpPresSpace():new() or a "Micro PS" must be requested from an Xbase Part using the method:lockPS(). After graphic output the Micro PS must be released with :unlockPS().
<aPoint>:= { <nX>, <nY> }
<aPoint> is an array of two elements which determines the coordinates for the point at which the marker is drawn. The first element <nX> specifies the x coordinate and the second element <nY> specifies the y coordinate. The unit for the coordinates depends on the coordinate system defined for the presentation space. If no presentation space is specified, the values for the coordinates are specified in pixels, which is the unit for a window. The origin for the coordinates (the point {0,0}) is the lower left. If <aPoint> is not specified, the marker is drawn at the current pen position.
Return

The return value of GraMarker() is .T. (true) if the marker was drawn, otherwise it is .F. (false). If the return value is .F., the cause of error can be determined with GraError().

Description

The function GraMarker() marks a single point at the position <aPoint>. Various marker types are available (cross, circle, square etc.). They must be selected before the output of a marker by calling the function GraSetAttrMarker(). The default marker is the #define constant GRA_MARKSYM_CROSS. The function GraMarker() does not change the pen position.

Examples
Drawing markers
// The example shows a basic call to GraMarker(). 
// It draws two markers. The position of the second marker is 
// determined with GraPos(). The first marker is drawn at the 
// pen position -> {0,0} 

PROCEDURE Main 

   SetColor("N/W")                     // fill window with pale gray 
   CLS 

   GraMarker()                         // mark pen position 
   GraMarker( NIL, {100, 100} )        // mark new point 

   Inkey(0)                            // wait for key press 
RETURN 
Feedback

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.