Home VDI VDI bindings Output functions

7.4 Attribute functions

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

7.4.1 Bitmap attributes

vsr_bg_color Sets background colour
vsr_fg_color Sets foreground colour

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

7.4.2 Fill attributes

This group of functions enables various attributes for the filling of areas to be manipulated. The following routines are available for this purpose:

vsf_bg_color Sets background colour
vsf_color Selects fill colour
vsf_fg_color Sets foreground colour
vsf_interior Selects fill-type
vsf_perimeter Draws or doesn't draw perimeter
vsf_style FSelects hatching pattern
vsf_udpat Defines user-defined hatching pattern
vsf_xperimeter Sets fill parameter visibility

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

7.4.3 Lines attributes

This group of functions enables various attributes for the drawing of lines to be manipulated. The following routines are available for this purpose:

v_bez_qual Sets quality of Bezier-spline generation
vsl_bg_color Sets background colour
vsl_color Sets line colour
vsl_ends Defines line-end type
vsl_fg_color Sets foreground colour
vsl_type Sets type of line depiction
vsl_udsty Defines user-defined line depiction
vsl_width Defines line width

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

7.4.4 Marker attributes

This group of functions enables various attributes for the drawing of markers to be manipulated. The following routines are available for this purpose:

vsm_bg_color Sets background colour
vsm_color Sets marker colour
vsm_fg_color Sets foreground colour
vsm_height Sets marker size
vsm_type Selects marker type

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

7.4.5 Text attributes

This group of functions enables various attributes for the handling of text to be manipulated. The following routines are available for this purpose:

v_topbot Sets text height
vst_alignment Sets horizontal and vertical alignment of a text
vst_arbpt Sets character cell height in points
vst_arbpt32 Sets character cell height in points (fix31)
vst_bg_color Sets background colour
vst_charmap Selects character mapping mode (Atari/Bitstream)
vst_color Sets colour for text output
vst_effects Selects text effects
vst_error Sets the GDOS error handling
vst_fg_color Sets foreground colour
vst_font Selects face
vst_height Sets text size
vst_kern Sets kerning mode
vst_map_mode Selects character mapping mode (Atari/Bitstream/Unicode).
vst_name Finds and sets text face by name
vst_point Sets size of character cell
vst_rotation Sets rotation of text output
vst_scratch Designates size of the scratch buffer
vst_setsize Sets character cell width in points
vst_setsize32 Sets character cell width in points (fix31)
vst_skew Sets angle of skew for skewed text ('italic')
vst_track_offset Sets offset for track kerning
vst_width Sets character width in pixels

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

7.4.6 Superior attributes

This group of functions permits setting of the writing mode as well as the intenstity of a colour; it encompasses the following routines:

v_ps_halftone Sets PostScript halftoning type
v_setrgb Sets colour intensity
v_setrgbi Sets colour or intensity
vs_bkcolor Sets background colour
vs_color Sets colour intensity of a colour
vs_color2 Sets colour intensity and colour for attributes
vs_grayoverride Fine-tunes grey level
vswr_mode Selects writing mode

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

7.4.6.1 vsr_bg_color

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

7.4.6.2 Bindings for vsr_bg_color

C: int16_t vsr_bg_color ( int16_t handle, int32_t color_space, COLOR_ENTRY *fg_color );
Binding:
int16_t vsr_bg_color( int16_t handle, int32_t color_space,
                      COLOR_ENTRY *fg_color )
{
   intin[0..1] = color_space;
   intin[2..5] = fg_color;

   contrl[0] = 201;
   contrl[1] = 0;
   contrl[3] = 6;
   contrl[5] = 4;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 201 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 6 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+10 contrl[5] 4
contrl+12 contrl[6] handle
intin intin[0..1] color_space
intin+4 intin[2..5] fg_color
intout intout[0] Return Value

7.4.6.3 vsr_fg_color

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

7.4.6.4 Bindings for vsr_fg_color

C: int16_t vsr_fg_color ( int16_t handle, int32_t color_space, COLOR_ENTRY *fg_color );
Binding:
int16_t vsr_fg_color( int16_t handle, int32_t color_space,
                      COLOR_ENTRY *fg_color )
{
   intin[0..1] = color_space;
   intin[2..5] = fg_color;

   contrl[0] = 200;
   contrl[1] = 0;
   contrl[3] = 6;
   contrl[5] = 4;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 200 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 6 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+10 contrl[5] 4
contrl+12 contrl[6] handle
intin intin[0..1] color_space
intin+4 intin[2..5] fg_color
intout intout[0] Return value

7.4.6.5 Graphical overview of fill-type and pattern index

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

7.4.6.6 Description of the 0033 writing modes

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

7.4.6.7 vsf_bg_color

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

7.4.6.8 Bindings for vsf_bg_color

C: int16_t vsf_bg_color ( int16_t handle, int32_t color_space, COLOR_ENTRY *fg_color );
Binding:
int16_t vsf_bg_color( int16_t handle, int32_t color_space,
                      COLOR_ENTRY *fg_color )
{
   intin[0..1] = color_space;
   intin[2..5] = fg_color;

   contrl[0] = 201;
   contrl[1] = 0;
   contrl[3] = 6;
   contrl[5] = 1;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 201 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 6 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+10 contrl[5] 1
contrl+12 contrl[6] handle
intin intin[0..1] color_space
intin+4 intin[2..5] fg_color
intout intout[0] Return value

7.4.6.9 vsf_color

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

7.4.6.10 Bindings for vsf_color

C: int16_t vsf_color ( int16_t handle, int16_t color_index );
Binding:
int16_t vsf_color (int16_t handle, int16_t color_index)
{
   intin[0] = color_index;

   contrl[0] = 25;
   contrl[1] = 0;
   contrl[3] = 1;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 25 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 1 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] color_index
intout intout[0] Return value

7.4.6.11 vsf_fg_color

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

7.4.6.12 Bindings for vsf_fg_color

C: int16_t vsf_fg_color ( int16_t handle, int32_t color_space, COLOR_ENTRY *fg_color );
Binding:
int16_t vsf_fg_color( int16_t handle, int32_t color_space,
                      COLOR_ENTRY *fg_color )
{
   intin[0..1] = color_space;
   intin[2..5] = fg_color;

   contrl[0] = 200;
   contrl[1] = 0;
   contrl[3] = 6;
   contrl[5] = 1;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 200 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 6 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+10 contrl[5] 1
contrl+12 contrl[6] handle
intin intin[0..1] color_space
intin+4 intin[2..5] fg_color
intout intout[0] Return Value

7.4.6.13 vsf_interior

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

7.4.6.14 Bindings for vsf_interior

C: int16_t vsf_interior ( int16_t handle, int16_t style );
Binding:
int16_t vsf_interior (int16_t handle, int16_t style)
{
   intin[0] = style;

   contrl[0] = 23;
   contrl[1] = 0;
   contrl[3] = 1;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 23 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 1 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] style
intout intout[0] Return Value

7.4.6.15 vsf_perimeter

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

7.4.6.16 Bindings for vsf_perimeter

C: int16_t vsf_perimeter ( int16_t handle, int16_t per_vis );
Binding:
int16_t vsf_perimeter (int16_t handle, int16_t per_vis)
{
   intin[0] = per_vis;

   contrl[0] = 104;
   contrl[1] = 0;
   contrl[3] = 1;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 104 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 1 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] per_vis
intout intout[0] Return Value

7.4.6.17 vsf_style

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

7.4.6.18 Bindings for vsf_style

C: int16_t vsf_style ( int16_t handle, int16_t style_index );
Binding:
int16_t vsf_style (int16_t handle, int16_t style_index)
{
   intin[0] = style_index;

   contrl[0] = 24;
   contrl[1] = 0;
   contrl[3] = 1;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 24 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 1 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] style_index
intout intout[0] Return Value

7.4.6.19 vsf_udpat

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

7.4.6.20 Bindings for vsf_udpat

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:
Address Element Contents
contrl contrl[0] 112 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 16*n # entry in intin
contrl+8 contrl[4] 0 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] pfill_pat[0]
... ... ...
... ... ...
intin+32n-2 intin[16n-1] pfill_pat[16n-1]

7.4.6.21 vsf_xperimeter

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

7.4.6.22 Bindings for vsf_xperimeter

C: int16_t vsf_xperimeter ( int16_t handle, int16_t on_off, int16_t f_or_l );
Binding:
int16_t vsf_xperimeter (int16_t handle, int16_t on_off,
                        int16_t f_or_l )
{
   intin[0] = on_off;
   intin[1] = f_or_l;

   contrl[0] = 104;
   contrl[1] = 0;
   contrl[3] = 2;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 104 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 2 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] on_off
intin+2 intin[1] f_or_l
intout intout[0] Return Value

7.4.6.23 vsl_bg_color

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

7.4.6.24 Bindings for vsl_bg_color

C: int16_t vsl_bg_color ( int16_t handle, int32_t color_space, COLOR_ENTRY *fg_color );
Binding:
int16_t vsl_bg_color( int16_t handle, int32_t color_space,
                      COLOR_ENTRY *fg_color )
{
   intin[0..1] = color_space;
   intin[2..5] = fg_color;

   contrl[0] = 201;
   contrl[1] = 0;
   contrl[3] = 6;
   contrl[5] = 2;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 201 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 6 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+10 contrl[5] 2
contrl+12 contrl[6] handle
intin intin[0..1] color_space
intin+4 intin[2..5] fg_color
intout intout[0] Return Value

7.4.6.25 vsl_color

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

7.4.6.26 Bindings for vsl_color

C: int16_t vsl_color ( int16_t handle, int16_t color_index );
Binding:
int16_t vsl_color (int16_t handle, int16_t color_index)
{
   intin[0] = color_index;

   contrl[0] = 17;
   contrl[1] = 0;
   contrl[3] = 1;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 17 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 1 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] color_index
intout intout[0] Return Value

7.4.6.27 vsl_ends

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

7.4.6.28 Bindings for vsl_ends

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:
Address Element Contents
contrl contrl[0] 108 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 2 # entry in intin
contrl+8 contrl[4] 0 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] beg_style
intin+2 intin[1] end_style

7.4.6.29 vsl_fg_color

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

7.4.6.30 Bindings for vsl_fg_color

C: int16_t vsl_fg_color ( int16_t handle, int32_t color_space, COLOR_ENTRY *fg_color );
Binding:
int16_t vsl_fg_color( int16_t handle, int32_t color_space,
                      COLOR_ENTRY *fg_color )
{
   intin[0..1] = color_space;
   intin[2..5] = fg_color;

   contrl[0] = 200;
   contrl[1] = 0;
   contrl[3] = 6;
   contrl[5] = 2;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 200 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 6 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+10 contrl[5] 2
contrl+12 contrl[6] handle
intin intin[0..1] color_space
intin+4 intin[2..5] fg_color
intout intout[0] Return value

7.4.6.31 vsl_type

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

7.4.6.32 Bindings for vsl_type

C: int16_t vsl_type ( int16_t handle, int16_t style );
Binding:
int16_t vsl_type (int16_t handle, int16_t style)
{
   intin[0] = style;

   contrl[0] = 15;
   contrl[1] = 0;
   contrl[3] = 1;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 15 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 1 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] style
intin+2 intin[1] Return Value

7.4.6.33 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

7.4.6.34 Bindings for vsl_udsty

C: void vsl_udsty ( int16_t handle, int16_t pattern );
Binding:
void vsl_udsty (int16_t handle, int16_t pattern)
{
   intin[0] = pattern;

   contrl[0] = 113;
   contrl[1] = 0;
   contrl[3] = 1;
   contrl[6] = handle;

   vdi ();
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 113 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 1 # entry in intin
contrl+8 contrl[4] 0 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] pattern

7.4.6.35 vsl_width

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

7.4.6.36 Bindings for vsl_width

C: int16_t vsl_width ( int16_t handle, int16_t width );
Binding:
int16_t vsl_width (int16_t handle, int16_t width)
{
   ptsin[0] = width;
   ptsin[1] = 0;

   contrl[0] = 16;
   contrl[1] = 1;
   contrl[3] = 0;
   contrl[6] = handle;

   vdi ();

   return ( ptsout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 16 # Function Opcode
contrl+2 contrl[1] 1 # entry in ptsin
contrl+4 contrl[2] 1 # entry in ptsout
contrl+6 contrl[3] 0 # entry in intin
contrl+8 contrl[4] 0 # entry in intout
contrl+12 contrl[6] handle
ptsin ptsin[0] width
ptsin+2 ptsin[1] 0
ptsout ptsout[0] Return value
ptsout+2 ptsout[1] 0

7.4.6.37 v_bez_qual

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

7.4.6.38 Bindings for v_bez_qual

C: int16_t v_bez_qual ( int16_t handle, int16_t qual, int16_t *set_qual );

Für GEM/3 Release 3.1 gilt:
int16_t v_bez_qual ( int16_t handle, int16_t qual );
Binding:
int16_t v_bez_qual (int16_t handle, int16_t qual,
                    int16_t *set_qual)
{
   intin[0] = 32;
   intin[1] = 1;
   intin[2] = qual;

   contrl[0] = 5;
   contrl[1] = 0;
   contrl[3] = 3;
   contrl[5] = 99;
   contrl[6] = handle;

   vdi ();

   *set_qual = intout[0];

   return intout[0];
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 5 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 3 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+10 contrl[5] 99 Sub-Opcode
contrl+12 contrl[6] handle
intin intin[0] 32
intin+2 intin[1] 1
intin+4 intin[2] qual
intout intout[0] set_qual

7.4.6.39 vsm_bg_color

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

7.4.6.40 Bindings for vsm_bg_color

C: int16_t vsm_bg_color ( int16_t handle, int32_t color_space, COLOR_ENTRY *fg_color );
Binding:
int16_t vsm_bg_color( int16_t handle, int32_t color_space,
                      COLOR_ENTRY *fg_color )
{
   intin[0..1] = color_space;
   intin[2..5] = fg_color;

   contrl[0] = 201;
   contrl[1] = 0;
   contrl[3] = 6;
   contrl[5] = 3;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 201 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 6 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+10 contrl[5] 3
contrl+12 contrl[6] handle
intin intin[0..1] color_space
intin+4 intin[2..5] fg_color
intout intout[0] Return value

7.4.6.41 vsm_color

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

7.4.6.42 Bindings for vsm_color

C: int16_t vsm_color ( int16_t handle, int16_t color_index );
Binding:
int16_t vsm_color (int16_t handle, int16_t color_index)
{
   intin[0] = color_index;

   contrl[0] = 20;
   contrl[1] = 0;
   contrl[3] = 1;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents
contrl contrl[0] 20 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 1 # entry in intin
contrl+8 contrl[4] 1 # entry in intout
contrl+12 contrl[6] handle
intin intin[0] color_index
intout intout[0] Return Value

7.4.6.43 vsm_fg_color

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

7.4.6.44 Bindings for vsm_fg_color

C: int16_t vsm_fg_color ( int16_t handle, int32_t color_space, COLOR_ENTRY *fg_color );
Binding:
int16_t vsm_fg_color( int16_t handle, int32_t color_space,
                      COLOR_ENTRY *fg_color )
{
   intin[0..1] = color_space;
   intin[2..5] = fg_color;

   contrl[0] = 200;
   contrl[1] = 0;
   contrl[3] = 6;
   contrl[5] = 3;
   contrl[6] = handle;

   vdi ();

   return ( intout[0] );
}
GEM-Arrays:
Address Element Contents