GEMLIB
0.44.0
|
attribute functions More...
Functions | |
void | vs_color (VdiHdl, short color_idx, short rgb[]) |
short | vswr_mode (VdiHdl, short mode) |
short | vsf_color (VdiHdl, short color_idx) |
short | vsf_interior (VdiHdl, short style) |
short | vsf_perimeter (VdiHdl, short vis) |
short | vsf_xperimeter (VdiHdl, short vis, short style) |
short | vsf_style (VdiHdl, short style) |
void | vsf_udpat (VdiHdl, short pat[], short planes) |
short | vsl_color (VdiHdl, short color_idx) |
void | vsl_ends (VdiHdl, short begstyle, short endstyle) |
short | vsl_type (VdiHdl, short style) |
void | vsl_udsty (VdiHdl, short pat) |
short | vsl_width (VdiHdl, short width) |
short | vsm_color (VdiHdl, short color_idx) |
short | vsm_height (VdiHdl, short height) |
short | vsm_type (VdiHdl, short symbol) |
void | vst_alignment (VdiHdl, short hin, short vin, short *hout, short *vout) |
short | vst_color (VdiHdl, short color_idx) |
short | vst_effects (VdiHdl, short effects) |
void | vst_error (VdiHdl, short mode, short *errorvar) |
short | vst_font (VdiHdl, short font) |
void | vst_height (VdiHdl, short height, short *charw, short *charh, short *cellw, short *cellh) |
short | vst_point (VdiHdl, short point, short *charw, short *charh, short *cellw, short *cellh) |
short | vst_rotation (VdiHdl, short ang) |
void | vst_scratch (VdiHdl, short mode) |
attribute functions
todo: add description here
void vs_color | ( | short | handle, |
short | index, | ||
short | rgb[] | ||
) |
Set Color Representation
handle | Device handle |
index | color index (pen) |
rgb | contain the intensity of red, green, blue as following:
|
This function sets the RGB color associated with a color index. The intensity of red, green and blue is set in per mille (0-1000). If the device driver has a CLUT, the new setting will immediately change the color of all pixels with color index index
.
If a device has more than 256 simultaneously displayable colors, it usually does not have a CLUT. In this case the pixels do not contain a color value or index but a direct color value in RGB (e.g. a pixel with 32 bits has 8 unused bits, 8 bits for red, 8 bits for green and 8 bits for blue). This means that the VDI creates a pseudo CLUT with 256 pens and calling vs_color() for one of these pens will not change the color of the pixels which have been drawn with this pen, but it will change the color of new pixels drawn with this pen. Note that the palettes are handled per workstation which means, that each workstation has its own palette (pseudo CLUT) and changing the RGB value for a color index on one workstation will not change the value of the same pen in another workstation.
References VDI_CNTRLMAX.
short vsf_color | ( | short | handle, |
short | index | ||
) |
sets the color index for filled areas
handle | Device handle |
index | requested fill color. If the index is invalid, color index 1 will be selected. If you use a colored pattern (see vsf_udpat()) the color index will be ignored; you should set it to 1. |
References VDI_CNTRLMAX.
short vsf_interior | ( | short | handle, |
short | style | ||
) |
selects the fill type for filled graphic objects
handle | Device handle |
style | requested fill type :
|
References VDI_CNTRLMAX.
short vsf_perimeter | ( | short | handle, |
short | vis | ||
) |
turns the outline of a filled area (rectangle, polygone, ellipse, ...) on or off.
handle | Device handle |
vis | perimeter flag
|
When visibility is on (the default at Open Workstation) the border of a fill area is drawn in the current fill area color with a solid line. When visibility is off, no outline is drawn.
References VDI_CNTRLMAX.
Referenced by v_opnvwk().
short vsf_style | ( | short | handle, |
short | style | ||
) |
sets the style index based on the fill interior style. This index has no effect if the interior style is hollow, solid, or user-defined.
handle | Device handle |
style | requested style index, range from 1 to a device-dependent maximum. If the requested index is not available, GEM VDI uses index style 1.The index references a hatch style if the selected fill interior style is hatch, or a pattern if the selected interior fill style is pattern. |
References VDI_CNTRLMAX.
void vsf_udpat | ( | short | handle, |
short | pat[], | ||
short | planes | ||
) |
is the function which allows you to set a user-defined 16*16 pixel pattern.
handle | Device handle |
pat | For the pattern data, bit 15 of word 1 is the upper left bit of the pattern. Bit 0 of word 16 is the lower right bit of the pattern. Bit zero is the Least Significant Bit of the word. Words are stored in the same format as 16-bit integers (ie pat[0] correspond to the top line of the pattern, and pat[15] correspond to the bottom line of the pattern). For a single plane pattern, a bit value of 1 indicates foreground color. A bit value of 0 indicates the background color. The color used for the foreground is determined by the current fill area color index. Patterns with multiple colors have to be stored in standard format and must have the same number of planes as the device. Exception: If the device is a Hicolor or Truecolor device (direct color mapping) you always pass a pattern width 32-bit pixels (xrgb). Note that the writing mode must be set to replace (mode MR_REPLACE = 1), when using a multiplane fill pattern. |
planes |
References VDI_CNTRLMAX.
short vsf_xperimeter | ( | short | handle, |
short | vis, | ||
short | style | ||
) |
turns the outline of a filled area (rectangle, polygone, ellipse, ...) on or off, and set the line type for this outline.
handle | Device handle |
vis | perimeter flag
|
style | same as vsl_type(). |
This call is similar to vsf_perimeter(), but one can choose the line type used to draw the perimeter. vsf_perimeter() only allow to draw solid lines.
References VDI_CNTRLMAX.
short vsl_color | ( | short | handle, |
short | index | ||
) |
sets the color index for lines
handle | Device handle |
index | requested line color. If the index is invalid, color index 1 will be selected. |
References VDI_CNTRLMAX.
void vsl_ends | ( | short | handle, |
short | begstyle, | ||
short | endstyle | ||
) |
changes the style of the line ends
handle | Device handle |
begstyle | end style for the first point |
endstyle | end style for the last point end style should be one of the following value:
|
References VDI_CNTRLMAX.
Referenced by v_opnvwk().
short vsl_type | ( | short | handle, |
short | style | ||
) |
sets the line type for polyline operations
handle | Device handle |
style | requested line type :
|
References VDI_CNTRLMAX.
void vsl_udsty | ( | short | handle, |
short | pat | ||
) |
set the pattern for the user-defined line type
handle | Device handle |
pat | user-defined line pattern specified in this 16-bit word. The Most Significant Bit (MSB) of the pattern word is the first pixel in the line. This line style is used for subsequent polyline operations when the application selects user defined line style, index 7. |
References VDI_CNTRLMAX.
short vsl_width | ( | short | handle, |
short | width | ||
) |
sets the width of lines for polyline operations
handle | Device handle |
width | requested line width |
Most device drivers ignore the line type and draw solid lines if the line is more than one pixel wide.
References VDI_CNTRLMAX.
Referenced by v_opnvwk().
short vsm_color | ( | short | handle, |
short | index | ||
) |
sets the color index for markers
handle | Device handle |
index | marker color. If the index is invalid, color index 1 will be selected. |
References VDI_CNTRLMAX.
short vsm_height | ( | short | handle, |
short | height | ||
) |
sets the marker height
handle | Device handle |
height | requested marker height. If the requested height does not exist, the next smaller height will be selected. Marker type 1 (dot) is always 1 pixel high. |
References VDI_CNTRLMAX.
Referenced by v_opnvwk().
short vsm_type | ( | short | handle, |
short | symbol | ||
) |
selects the kind of marker for v_pmarker().
handle | Device handle |
symbol | requested marker type. If the requested marker kind is not available, type 3 is used. The total number of markers available is device dependent, but GEM VDI always defines at least six marker types:
|
References VDI_CNTRLMAX.
void vst_alignment | ( | short | handle, |
short | hin, | ||
short | vin, | ||
short * | hout, | ||
short * | vout | ||
) |
sets the horizontal and vertical alignment for graphic text
handle | Device handle |
hin | requested horizontal alignment. If an invalid horizontal alignment is requested, the text will be left justified.
|
vin | requested vertical alignment. If an invalid vertical alignment is requested, the text will be aligned to the baseline.
|
hout | selected horizontal alignment [option CHECK_NULLPTR] hout may be NULL |
vout | selected vertical alignment [option CHECK_NULLPTR] vout may be NULL |
References VDI_CNTRLMAX.
short vst_color | ( | short | handle, |
short | index | ||
) |
sets the color index for text output
handle | Device handle |
index | requested color index. If the index is invalid, color index 1 will be selected. |
References VDI_CNTRLMAX.
short vst_effects | ( | short | handle, |
short | effects | ||
) |
sets special text effects (really?).
handle | Device handle |
effects | requested text effects. effects is one, or any combination of the following values:
|
References VDI_CNTRLMAX.
Referenced by v_opnvwk().
void vst_error | ( | short | handle, |
short | mode, | ||
short * | errorvar | ||
) |
handle | Device handle |
mode | |
errorvar |
References VDI_CNTRLMAX, VDI_INTOUTMAX, and VDI_PTSOUTMAX.
short vst_font | ( | short | handle, |
short | font | ||
) |
selects a font for text output
handle | Device handle |
font | requested font. If a font with the requested does not exist, the system font will be chosen. |
References VDI_CNTRLMAX.
void vst_height | ( | short | handle, |
short | height, | ||
short * | charw, | ||
short * | charh, | ||
short * | cellw, | ||
short * | cellh | ||
) |
sets the character height in pixels
handle | Device handle |
height | requested character height. The height is specified as the distance between baseline and the top of the character cell. |
charw | selected character width [option CHECK_NULLPTR] charw may be NULL |
charh | selected character height [option CHECK_NULLPTR] charh may be NULL |
cellw | selected character cell width [option CHECK_NULLPTR] cellw may be NULL |
cellh | selected character cell height [option CHECK_NULLPTR] cellh may be NULL |
char_width
and cell_width
are not the exact character widths but only rounded values.References VDI_CNTRLMAX.
Referenced by v_opnvwk().
short vst_point | ( | short | handle, |
short | point, | ||
short * | charw, | ||
short * | charh, | ||
short * | cellw, | ||
short * | cellh | ||
) |
sets the character cell height in points (1 pt = 1/72"). For bitmap font this function selects the closest height which is smaller or equal to the requested size. If the font is a vector font, only predefined heights can be selected (usually 8, 9, 10, 11, 12, 14, 18, 24, 36, and 48 pt).
handle | Device handle |
point | requested character cell height (1/72"). The specified height is the distance between the baseline of one line of text and the baseline of the next line of text, which is the character cell height. |
charw | selected character width |
charh | selected character height |
cellw | selected character cell width |
cellh | selected character cell height |
References VDI_CNTRLMAX.
short vst_rotation | ( | short | handle, |
short | ang | ||
) |
enables text rotation in 1/10 of degrees. If the selected font is a bitmap font, rotation works only in steps of 90 degrees
handle | Device handle |
ang | requested angle |
References VDI_CNTRLMAX.
void vst_scratch | ( | short | handle, |
short | mode | ||
) |
short vswr_mode | ( | short | handle, |
short | mode | ||
) |
selects the writing mode for graphic operations
handle | Device handle |
mode | requested writing mode. The writing mode specifies the operation performed between the color indices of the current pixel (source) and the existing pixel (destination), thus affecting the way new pixels from lines, markers, filled areas, and text are placed on the display. Four modes exist:
|
References VDI_CNTRLMAX.