Function GraSegDrawMode() Foundation

Sets or retrieves drawing mode for graphic segments.

GraSegDrawMode( [<oPS>], [<nDrawMode>] ) --> nOldMode
The argument <oPS> specifies the presentation space where the graphic segment drawing mode is set. 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 using XbpPresSpace():new(). A "Micro PS" cannot be used for this function.
The following table lists #define constants used for the optional parameter <nDrawMode>:
Display modes for graphic segments
Constant Description
GRA_DM_DRAW Segments draw the graphic primitives
GRA_DM_RETAIN Segments save the graphic primitives
GRA_DM_DRAWANDRETAIN Segments draw and save the primitives
  1. The default value is GRA_DM_DRAWANDRETAIN.

The function GraSegDrawMode() returns the currently set drawing mode for segments as a numeric value. When a new mode is specified, the return value is the previously set mode.


The display mode for graphic segments is only significant during the definition of a segment. The mode determines how the graphic primitives executed between GraSegOpen() and GraSegClose() are interpreted.


In this mode, the graphic primitives are executed but not saved. GraSegDraw() cannot redisplay the primitives after the segment is closed. This mode is suitable for generation of Meta files (see XbpMetaFile()).


This mode records graphic primitives which are called between GraSegOpen() and GraSegClose(). However, no display occurs during the definition of a segment. The graphic primitives become visible after close of the segment definition when the function GraSegDraw() is executed.


In this mode the graphic primitives are executed and displayed during the segment definition between GraSegOpen() and GraSegClose(). They are also saved and can be redisplayed by calls to GraSegDraw().

If the mode is changed, the old mode should always be saved and reset when the graphic output is finished.


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.