overview.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
About Marker Primitives (1.2)
Using Section  Function Group                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
                          About Marker Primitives
 
This topic describes a graphics object called a marker primitive. You should
also be familiar with the following topics:
 
    Presentation spaces and device contexts
    Color and mix modes
 
A marker or a symbol is a character or a symbol that is always drawn
centered over a point. Applications typically use marker primitives to
identify points of interest such as points on a graph.
 
The Default Marker and the Default Marker Set
 
When you create a presentation space, it contains the default marker──a
cross──from the default marker set. The default marker set contains eleven
image characters, which are drawn by setting pels in a rectangular region
called a marker box.
 
Within the marker box, the color of the set pels defines the foreground
color, whose default color is neutral (black on the display and on
printers); the color of the pels that are not set defines the background
color, whose default color is the background color on the device (white on
the display, and the paper color on printers). The height and width of the
default marker are device dependent. You can retrieve these dimensions by
calling the DevQueryCaps function.
 
Custom Markers
 
You can use any font's character set as a marker set and any character
within that marker set as a marker. To retrieve the value that identifies
the current marker set, call the GpiQueryMarkerSet function. To retrieve the
value that identifies the current marker character, call the GpiQueryMarker
function. You can call the GpiQueryAttrs function to retrieve both values
simultaneously.
 
If the current marker set does not contain a symbol that suits your
application, you can load a new character set and select a marker from that
set. Once you have loaded a new character set, you can select it as a marker
set by calling the GpiSetMarkerSet function. After selecting the marker set,
call the GpiSetMarker function to select a marker from the set. You can call
the GpiSetAttrs function to set both values simultaneously.
 
Image and Vector Markers
 
If the current marker set contains image characters, the marker-box
dimensions are fixed, since you cannot alter the size of image markers. If
the current marker set contains vector characters (characters outlined by
using line and arc functions), you can change the size of the marker box by
calling the GpiSetMarkerBox or GpiSetAttrs function.
 
Marker Colors
 
When you draw a marker, three colors affect its appearance──the foreground
color, the background color, and the current color of the drawing surface.
For vector markers, the foreground color defines the color of the lines,
arcs, and fill patterns that draw the marker, and the background color
defines the color of the remainder of the marker box. The drawing-surface
color is the color of the drawing surface on the output device associated
with the application's presentation space. In addition to the foreground,
background, and drawing-surface colors, two mix modes──foreground and
background──affect the appearance of the marker. The foreground mix mode
specifies a color mix mode between the foreground marker color and the
drawing-surface color. The background mix mode specifies a color mix mode
between the background marker color and the drawing-surface color. You can
determine the current marker colors and mix modes by calling the
GpiQueryAttrs function. You can set new colors and mix modes by calling the
GpiSetAttrs function.
 
Drawing Markers
 
You can draw a single marker or a series of markers. To draw a single
marker, you must set the fields in a POINTL structure to correspond to the
marker position in world coordinates and then call the GpiMarker function,
passing it the address of the POINTL structure as the second argument. To
draw a series of markers, you must set the fields in an array of POINTL
structures to correspond to the marker positions in world coordinates and
then call the GpiPolyMarker function, passing it the number of points in the
array as the second argument and the name of the array as the third
argument.
 
 
                                      ♦