This library contains functions that allow the setting of certain
attributes. The following categories are available for this:
Note: The attributes set here are valid for a single
workstation, and retain their validity until the program terminates,
or the attributes are reset elsewhere.
See Also: VDI workstations Style guidelines
Note: The attributes set here are valid for a single
workstation, and retain their validity until the program terminates,
or the attributes are reset elsewhere.
See Also:
VDI workstations Style guidelines VDI fundamentals
This group of functions enables various attributes for the filling
of areas to be manipulated. The following routines are available for
this purpose:
The attributes set here are valid for a single workstation, and
retain their validity until the program terminates, or the attributes
are reset elsewhere.
See Also:
VDI workstations Fill-type and pattern index Style guidelines VDI fundamentals
This group of functions enables various attributes for the drawing
of lines to be manipulated. The following routines are available for
this purpose:
The attributes set here are valid for a single workstation, and
retain their validity until the program terminates, or the attributes
are reset elsewhere.
See Also:
VDI workstations Style guidelines
This group of functions enables various attributes for the drawing
of markers to be manipulated. The following routines are available for
this purpose:
The attributes set here are valid for a single workstation, and
retain their validity until the program terminates, or the attributes
are reset elsewhere.
See Also: VDI workstations Style guidelines
This group of functions enables various attributes for the
handling of text to be manipulated. The following routines are
available for this purpose:
The attributes set here are valid for a single workstation, and
retain their validity until the program terminates, or the attributes
are reset elsewhere.
See Also: VDI workstations Style guidelines
This group of functions permits setting of the writing mode as well as
the intenstity of a colour; it encompasses the following routines:
The attributes set here are valid for a single workstation, and
retain their validity until the program terminates, or the attributes
are reset elsewhere.
See Also: VDI workstations Style guidelines
| Name: | »Set Background Color«
|
| Opcode: | 201 (sub-opcode 4)
|
| Syntax: | int16_t vsr_bg_color ( int16_t handle, int32_t color_space,
COLOR_ENTRY *fg_color );
|
| Description: | This function sets the background colour for bitmaps.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_space | Colour space (at present only 0 for the colour space set, or
CSPACE_RGB) |
| fg_color | COLOR_ENTRY der Hintergrundfarbe |
|
| Return value: | -1 = Wrong subfunction number
0 = Function not present
1 = All OK
|
| Availability: | As of NVDI 5.00
|
| Group: | Bitmap attributes
|
| See Also: | Binding
|
| Name: | »Set Foreground Color«
|
| Opcode: | 200 (Sub-Opcode 4)
|
| Syntax: | int16_t vsr_fg_color ( int16_t handle, int32_t color_space,
COLOR_ENTRY *fg_color );
|
| Description: | This function sets the foreground colour for bitmaps.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_space | Colour space (at present only 0 for the colour space set, or
CSPACE_RGB) |
| fg_color | COLOR_ENTRY of the foreground colour |
|
| Return value: | -1 = Wrong subfunction number
0 = Function not present
1 = All OK
|
| Availability: | As of NVDI 5.00.
|
| Group: | Bitmap attributes
|
| See Also: | Binding
|
The following illustration shows the possible combinations of the
fill-type and the pattern index. The first number here specifies the
fill-type (blank (0), pattern (2) or hatching (3)), the second the
index of the fill-pattern or hatching style.

Note: A fill-type with the value 1 followed by any
hatching index always corresponds to fill-type 2 with hatching index 8
(solid). Index 1 for patterns of type 2 is always the pattern with the
lowest intensity on the relevant output device, and in addition always
in monochrome.
See Also: vsf_interior vsf_style
Replace: In this mode the VDI overwrites the
background with the foreground colour in places where the
corresponding bit is set, or with the colour white if the
corresponding bit has the value 0. The logical combination is as
follows:
New := (foreground AND mask) OR (background AND NOT mask)
If we look at this in terms of working with pencil and paper, one
can imagine this as follows: First one draws a figure on white paper,
cuts it out and then sticks it over the graphic.
Transparent: In this mode, all bits of the figure to be
drawn that have the value 0 (i.e. are not set) are ignored by the
VDI. So only those bits are output that are set. The logical
combination in this case is as follows:
New := (foreground AND mask ) OR (colour AND NOT mask)
Here again a comparison of working with pencil and paper: This
mode corresponds to the Replace mode, only one is not drawing on
normal paper but on transparent foil.
XOR: In this mode all bits of the background and the
figure to be drawn are combined with an exclusive-OR (XOR), which
shows a useful and interesting feature:
If the same figure is drawn a second time in this mode, then it
will suddenly disappear again. Reason: An XOR combination of a bit
with itself always results in the inverses value. This is why this
mode is well suited for simple animations like a rubber box; the
recipe for this is as follows:
| 1. | Output the object once |
| 2. | Output the object again (it has now disappeared again) |
| 3. | Alter the size or position of the object |
| 4. | Back to step 1 |
The logical combination here is: New := (mask XOR colour)
Im allgemeinen läßt sich über diesen Modus nur
aussagen, daß aus der Farbe Schwarz die Farbe Weiß wird,
und umgekehrt; alles andere ist nicht fest definiert.
Reverse transparent: In this mode, only those pixels are
taken into account which are set to the value 0 in the figure to be
drawn. The logical combination in this case is:
New := (colour AND mask) OR (foreground AND NOT mask)
This mode too offers some interesting application ppossibilities;
thus it can be used together with Transparent mode, for instance, to
let text appear with an additional background colour.
The following illustration should clarify the VDI writing
modes:

See Also: vswr_mode
| Name: | »Set Background Color« - Set the background colour
for objects
|
| Opcode: | 201 (Sub-Opcode 1)
|
| Syntax: | int16_t vsf_bg_color ( int16_t handle, int32_t color_space,
COLOR_ENTRY *fg_color );
|
| Description: | The call vsf_bg_color sets the background colour for drawn
objects.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_space | Colour space (at present only 0 for the colour space set, or
CSPACE_RGB) |
| fg_color | COLOR_ENTRY of the background colour |
|
| Return value: | -1 = Wrong subfunction number
0 = Function not present
1 = All OK
|
| Availability: | As of NVDI 5.00.
|
| Group: | Fill attributes
|
| See Also: | Binding
|
| Name: | »Set fill colour index« - Set the colour with which
a 2-dimensional graphic object is to be filled.
|
| Opcode: | 25
|
| Syntax: | int16_t vsf_color ( int16_t handle, int16_t color_index );
|
| Description: | The call vsf_color sets the fill colour for 2-dimensional
graphic objects.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_index | Requested fill color index |
Note: The colour indices 0 and 1 are always available; all
others depend on the output device being used. An invalid colour index
will be replaced by the value 1. The colour index has no effect on
multicoloured patterns; it should be set to 1 in this case.
|
| Return value: | The function returns the actual colour set.
|
| Availability: | Supported by all drivers.
|
| Group: | Fill attributes
|
| See Also: | Binding v_fillarea v_contourfill vr_recfl v_bar
v_pieslice v_circle v_ellipse v_ellpie v_rfbox vsf_udpat
|
| Name: | »Set foreground colour« - Set the foreground colour
for a filled object.
|
| Opcode: | 200 (Sub-Opcode 1)
|
| Syntax: | int16_t vsf_fg_color ( int16_t handle, int32_t color_space,
COLOR_ENTRY *fg_color );
|
| Description: | This function sets the foreground colour for a filled
2-dimensional graphic object.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_space | Colour space (at present only 0 for the colour space set, or
CSPACE_RGB) |
| fg_color | COLOR_ENTRY of the foreground colour |
|
| Return value: | -1 = Wrong subfunction number
0 = Function not present
1 = All OK
|
| Availability: | As of NVDI 5.00.
|
| Group: | Fill attributes
|
| See Also: | Binding
|
| Name: | »Set fill interior style« - Set the fill-pattern
type.
|
| Opcode: | 23
|
| Syntax: | int16_t vsf_interior ( int16_t handle, int16_t style );
|
| Description: | This function selects the fill-pattern type for a filled
2-dimensional graphic object.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| style | Requested fill type
| 0 = | Hollow |
| 1 = | Solid |
| 2 = | Pattern |
| 3 = | Hatch |
| 4 = | User-defined style |
|
Note: If the requested type is invalid, type 0 (hollow)
will be selected.
|
| Return value: | The function returns the fill-type actually selected.
|
| Availability: | Supported by all drivers.
|
| Group: | Fill attributes
|
| See Also: | Binding v_fillarea v_contourfill vr_recfl v_bar
v_pieslice v_circle v_ellipse v_ellpie v_rfbox vsf_style
vsf_udpat
|
| Name: | »Set fill perimeter visibility« - Determine whether
an outline is to be drawn around filled areas.
|
| Opcode: | 104
|
| Syntax: | int16_t vsf_perimeter ( int16_t handle, int16_t per_vis );
|
| Description: | This function turns the outline border of a filled area
(rectangle, polygon, ellipse, ...) on or off.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| per_vis | Visibility flag:
| 0 = | Invisible |
| <> 0 = | Visible |
|
Note: With outlining activated (default), the border will
be drawn in the current fill colour and as a continuous line.
|
| Return value: | The function returns the mode actually set.
|
| Availability: | Supported by all drivers.
|
| Group: | Fill attributes
|
| See Also: | Binding vsf_xperimeter v_fillarea v_contourfill
vr_recfl v_bar v_pieslice v_circle v_ellipse v_ellpie
v_rfbox
|
| Name: | »Set fill style index« - Set the fill-pattern.
|
| Opcode: | 24
|
| Syntax: | int16_t vsf_style ( int16_t handle, int16_t style_index );
|
| Description: | The call vsf_style determines the fill-pattern. The following
apply:
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| style_index | Index |
Note: The function can only be used sensibly when the fill
type was not chosen as empty, opaque or user-defined.
Unavailable indices are replaced by pattern index 1.
|
| Return value: | The function returns the fill-pattern actually set.
|
| Availability: | Supported by all drivers.
|
| Group: | Fill attributes
|
| See Also: | Binding v_fillarea v_contourfill vr_recfl v_bar
v_pieslice v_circle v_ellipse v_ellpie v_rfbox vsf_interior
|
| Name: | »Set user-defined fill-pattern« - Define a new
fill-pattern.
|
| Opcode: | 112
|
| Syntax: | void vsf_udpat ( int16_t handle, int16_t *pfill_pat, int16_t
planes );
|
| Description: | The call vsf_udpat sets up a new fill-pattern, freely defined
by the user. The following apply:
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| pfill_pat | Pointer to an array of 16 * planes WORDs that define
the bit pattern for a line of the fill |
| planes | Number of colour planes |
Notes: Each line reproduces the fill-pattern for one
colour plane. The first entry of a line corresponds here to the first
line of the pattern, etc.
Patterns with multiple colours 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
colour mapping) you always pass a pattern width of 32-bit pixels
(xrgb) and pfill_pat points to a 16 * 16 array of LONGs.
If you use a pattern with multiple colours you should select
colour index 1 and writing mode REPLACE.
|
| Return value: | The function does not return a result.
|
| Availability: | Supported by all drivers.
|
| Group: | Fill attributes
|
| See Also: | Binding vsf_interior
|
| C: | void vsf_udpat ( int16_t handle, int16_t *pfill_pat, int16_t
planes );
|
| Binding: |
void vsf_udpat (int16_t handle, int16_t *pfill_pat,
int16_t planes)
{
intin[0..16n-1] = pfill_pat[0..16n-1];
contrl[0] = 112;
contrl[1] = 0;
contrl[3] = planes * 16;
contrl[6] = handle;
vdi ();
}
|
| GEM-Arrays: |
|
| Name: | »Set fill perimeter visibility« - Determine whether
an outline is to be drawn round filled areas.
|
| Opcode: | 104
|
| Syntax: | int16_t vsf_xperimeter ( int16_t handle, int16_t on_off,
int16_t f_or_l );
|
| Description: | This function turns the outline border of a filled area
(rectangle, polygon, ellipse, ...) on or off and sets the line style
for the perimeter outline.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| on_off | Desired mode:
| 0 = | Turn perimeter outlining off |
| 1 = | Turn perimeter outlining on |
| -1 = | Do not change perimeter outlining |
|
| f_or_l | Line type, as for vsl_type:
| 0 = | Use normal fill colour for perimeter |
| 1 = | Use line style attributes for perimeter |
|
|
| Return value: | The function returns the mode actually set.
|
| Availability: | GEM/3 Release 3.1
|
| Group: | Fill attributes
|
| See Also: | Binding vsf_perimeter v_fillarea v_contourfill
vr_recfl v_bar v_pieslice v_circle v_ellipse v_ellpie
v_rfbox
|
| Name: | »Set background colour« - Set background colour for
lines.
|
| Opcode: | 201 (Sub-Opcode 2)
|
| Syntax: | int16_t vsl_bg_color ( int16_t handle, int32_t color_space,
COLOR_ENTRY *fg_color );
|
| Description: | The call vsl_bg_color sets the background colour for drawn
lines.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_space | Colour space (at present only 0 for the colour space set, or
CSPACE_RGB) |
| fg_color | COLOR_ENTRY of the background colour |
|
| Return value: | -1 = Wrong subfunction number
0 = Function not present
1 = All OK
|
| Availability: | NVDI 5.00 onwards.
|
| Group: | Lines attributes
|
| See Also: | Binding
|
| Name: | »Set polyline colour index« - Set the line colour.
|
| Opcode: | 17
|
| Syntax: | int16_t vsl_color ( int16_t handle, int16_t color_index );
|
| Description: | The call vsl_color sets the colour index for lines.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_index | Line colour |
Note: The colour indices 0 and 1 are available on all
devices; all other values depend on the output device being used at
the time.
If the index is invalid, colour index 1 will be selected.
|
| Return value: | The function returns the line colour actually set.
|
| Availability: | Supported by all devices.
|
| Group: | Lines attributes
|
| See Also: | Binding v_pline v_arc v_ellarc v_rbox
|
| Name: | »Set polyline end styles« - Set the shape of line
ends.
|
| Opcode: | 108
|
| Syntax: | void vsl_ends ( int16_t handle, int16_t beg_style, int16_t
end_style );
|
| Description: | The call vsl_ends sets the appearance of the line ends. The
following apply:
| Parameter | Meaning Symbole |
| | |
| handle | Workstation identifier |
| beg_style | End style for the first point:

| 0 = | Squared (default) |
| 1 = | Arrowed |
| 2 = | Rounded |
|
| end_style | End style for the last point (as above) |
Note: Both the squared style and the arrow style end at
the end of the polyline. The rounded style is drawn such that the
center of the rounding is at the end of the polyline.
|
| Return value: | The function does not return a result.
|
| Availability: | Supported by all devices.
|
| Group: | Lines attributes
|
| See Also: | Binding v_pline v_arc v_ellarc v_rbox
|
| C: | void vsl_ends ( int16_t handle, int16_t beg_style, int16_t
end_style );
|
| Binding: |
void vsl_ends (int16_t handle, int16_t beg_style,
int16_t end_style)
{
intin[0] = beg_style;
intin[1] = end_style;
contrl[0] = 108;
contrl[1] = 0;
contrl[3] = 2;
contrl[6] = handle;
vdi ();
}
|
| GEM-Arrays: |
|
| Name: | »Set foreground colour« - Set foreground colour for
lines.
|
| Opcode: | 200 (Sub-Opcode 2)
|
| Syntax: | int16_t vsl_fg_color ( int16_t handle, int32_t color_space,
COLOR_ENTRY *fg_color );
|
| Description: | The call vsl_fg_color sets the foreground colour for drawn
lines.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_space | Colour space (at present only 0 for the colour space set, or
CSPACE_RGB) |
| fg_color | COLOR_ENTRY of the foreground colour |
|
| Return value: | -1 = Wrong subfunction number
0 = Function not present
1 = All OK
|
| Availability: | NVDI 5.00 onwards.
|
| Group: | Lines attributes
|
| See Also: | Binding
|
| Name: | »Set polyline type« - Set the line type.
|
| Opcode: | 15
|
| Syntax: | int16_t vsl_type ( int16_t handle, int16_t style );
|
| Description: | The call vsl_type sets the line type for polyline operations.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| style | Requested line type:
| 1 = | Solid |
| 2 = | Long dash |
| 3 = | Dot |
| 4 = | Dash,dot |
| 5 = | Dash |
| 6 = | Dash,dot,dot |
| 7 = | User-defined, vsl_udsty |
|
Note: Line types from the value 8 on depend on the output
device in each case. If the requested line type is not available, line
type 1 will be selected (solid).
You can obtain the available line types with the function
vq_extnd.
|
| Return value: | The function returns the line type actually set.
|
| Availability: | Supported by all devices.
|
| Group: | Lines attributes
|
| See Also: | Binding v_pline v_arc v_ellarc v_rbox vsl_udsty
|
| Name: | »Set user-defined line style pattern«
|
| Opcode: | 113
|
| Syntax: | void vsl_udsty ( int16_t handle, int16_t pattern );
|
| Description: | The call vsl_udsty sets the freely-definable line style for
vsl_type. The following apply:
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| pattern | Line style pattern WORD, 16 bits |
Note: The Most Significant Bit (MSB) of the
pattern WORD is the first pixel in the line. The default value
is a completely solid line.
|
| Return value: | The function does not return a result.
|
| Availability: | Supported by all devices.
|
| Group: | Lines attributes
|
| See Also: | Binding vsl_type
|
| Name: | »Set polyline width«
|
| Opcode: | 16
|
| Syntax: | int16_t vsl_width ( int16_t handle, int16_t width );
|
| Description: | The call vsl_width sets the line width for lines and
perimeters. The following apply:
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| width | Line width (must be odd!) |
Note: The width of the line always refers to the
coordinates in the X-direction. As the VDI can only draw lines an
odd number of pixels thick, the actually set width is smaller or equal
to the selected width as values will be rounded down to the nearest
odd number. The function is not available on all output
devices.
Most device drivers ignore the line type and draw solid lines if
the line is more than one pixel wide.
|
| Return value: | The function returns the line width actually set.
|
| Availability: | Supported by all devices.
|
| Group: | Lines attributes
|
| See Also: | Binding v_pline v_arc v_ellarc v_rbox
|
| Name: | »Set Bezier quality« - Set quality of the Bezier
spline creation.
|
| Opcode: | 5 (Escape 99, Opcode 32)
|
| Syntax: | int16_t v_bez_qual ( int16_t handle, int16_t qual, int16_t
*set_qual );
|
| Description: | The call v_bez_qual sets a new factor that determines the
quality and speed with which Bezier splines are drawn. The following
apply:
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| qual | Requested Bezier quality |
| set_qual | Realized Bezier quality (not available with GEM/3 Release
3.1). |
Note: The quality of the Beziers can be set as usual in
percent (i.e. from 0 to 100), where 0 is fastest but produces the
lowest quality while 100 is slowest with the highest possible quality.
set_qual may not be an exact percentage as the rendering
engine may not support every possible value between 1 and 99.
|
| Return value: | The function returns the old quality factor.
The GEM/3 and NVDI bindings also returns set_qual.
|
| Availability: | As of GEM/3 Release 3.1, SpeedoGDOS 4.00 onwards and NVDI
2.10 onwards.
|
| Group: | Lines attributes
|
| See Also: | Binding v_bez_on v_bez_off v_bez v_bez_fill
v_set_app_buff
|
| Name: | »Set background colour« - Set background colour for
markers.
|
| Opcode: | 201 (Sub-Opcode 3)
|
| Syntax: | int16_t vsm_bg_color ( int16_t handle, int32_t color_space,
COLOR_ENTRY *fg_color );
|
| Description: | The call vsm_bg_color sets the background colour for markers.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_space | Colour space (at present only 0 for the colour space set, or
CSPACE_RGB) |
| fg_color | COLOR_ENTRY of the background colour |
|
| Return value: | -1 = Wrong subfunction number
0 = Function not present
1 = All OK
|
| Availability: | NVDI 5.00 onwards.
|
| Group: | Marker attributes
|
| See Also: | Binding
|
| Name: | »Set polymarker colour index« - Set the colour of
the marker points.
|
| Opcode: | 20
|
| Syntax: | int16_t vsm_color ( int16_t handle, int16_t color_index );
|
| Description: | The call vsm_color sets the colour of the markers. The
following apply:
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_index | Marker colour |
Note: The colour indices 0 and 1 are always available, all
further ones depend on the output device. If the index is invalid,
colour index 1 will be selected.
|
| Return value: | The function returns the colour index actually selected.
|
| Availability: | Supported by all devices.
|
| Group: | Marker attributes
|
| See Also: | Binding v_pmarker
|
| Name: | »Set foreground colour« - Set foreground colour for
markers.
|
| Opcode: | 200 (Sub-Opcode 3)
|
| Syntax: | int16_t vsm_fg_color ( int16_t handle, int32_t color_space,
COLOR_ENTRY *fg_color );
|
| Description: | The call vsm_fg_color sets the foreground colour for markers.
| Parameter | Meaning |
| | |
| handle | Workstation identifier |
| color_space | Colour space (at present only 0 for the colour space set, or
CSPACE_RGB) |
| fg_color | COLOR_ENTRY of the foreground colour |
|
| Return value: | -1 = Wrong subfunction number
0 = Function not present
1 = All OK
|
| Availability: | NVDI 5.00 onwards.
|
| Group: | Marker attributes
|
| See Also: | Binding
|