Home VDIVDI Output functionsOutput functions Input functionsInput functions

7.6 Inquire functions

This library contains functions to inquire about a multitude of set attributes. The following routines are available for this purpose:

vq_cellarray Inquires the definition of a colour selection cell array
vq_color Gets colour intensity information
vq_devinfo Inquires status of an output device
vq_ext_devinfo Gets information about a GDOS driver
vq_extnd Gets additional information about the configuration of a workstation
vq_ptsinsz Internal function from GDOS
vq_scrninfo Gets information about screen format
vqf_attributes Gets fill attributes
vqf_bg_color Gets object background colour
vqf_fg_color Gets object foreground colour
vqin_mode Inquires input mode of an input device
vql_attributes Gets line attributes
vql_bg_color Gets line background colour
vql_fg_color Gets line foreground colour
vqm_attributes Gets marker atttributes
vqm_bg_color Gets marker background colour
vqm_fg_color Gets marker foreground colour
vqr_bg_color Gets bitmap background colour
vqr_fg_color Gets bitmap foreground colour
vqt_advance Gets position for next vector character
vqt_advance32 Gets more exact position for next vector character (fix31).
vqt_attributes Gets text attributes
• vqt_cacheinfo No information available at present
vqt_cachesize Gets size of the vector character cache
vqt_char_index Converts index from/ to given mappings
vqt_devinfo Inquires status of an output device
• vqt_drv_avail No information available at present
vqt_ext_name Extended function for obtaining font information
vqt_extent Calculates dimensions of a text bounding rectangle
vqt_f_extent Calculates dimensions of a text for vector fonts
• vqt_f_extent16 Calculates dimensions of a text for 16-bit Speedo character indexed text
vqt_bg_color Gets text background colour
vqt_fg_color Gets text foreground colour
vqt_fontheader Gets information about a font header
vqt_fontinfo Gets information about a font
vqt_get_table Inquires address of the character transformation tables
vqt_justified Inquires offsets from an alignment point
vqt_name Gets name and index of a font
vqt_name_and_id Finds font ID and name
vqt_pairkern Gets adjustment vector information for kerning of a character pair
vqt_real_extent Gets bounding rectangle around a text
vqt_trackkern Gets adjustment vectors for fonts with track-kerning
vqt_width Calculates width of a character cell
vqt_xfntinfo Gets information about a font
v_create_driver_info Gets information about a driver
v_delete_driver_info Deletes information about a driver
v_get_driver_info Gets extended information about a driver
v_getbitmap_info Gets placement information about the bitmap of a vector character
v_read_default_settings Gets default printer settings
v_write_default_settings Sets the default printer settings

Note: Besides general attributes, the functions listed here can obtain extensive information about text handling.

See also: VDI workstations   Style guidelines

7.6.1 vqf_attributes

Name: »Inquire current fill area attributes« - Obtain the attributes for filling area
 
Opcode: 37
 
Syntax: void vqf_attributes ( int16_t handle, int16_t *attrib );
 
Description: The call vqf_attributes reports back the current attributes for filled graphic objects.
 
Parameter Meaning
   
handle Workstation identifier
attrib[0] Fill type
attrib[1] Fill colour
attrib[2] Fill style index
attrib[3] Writing mode
attrib[4] Perimeter flag:
0 = invisible
<> 0 = visible
Return value: The function does not return a result.
 
Availability: Supported by all devices.
 
Group: Inquire functions
 
See also: Binding   vswr_mode   vs_color   vsf_interior   vsf_style   vsf_color   vsf_perimeter
 

7.6.2 Bindings for vqf_attributes

C: void vqf_attributes ( int16_t handle, int16_t *attrib );
 
Binding:
 
void vqf_attributes (int16_t handle, int16_t *attrib)
{
   contrl[0] = 37;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[6] = handle;

   vdi ();

   attrib[0..4] = intout[0..4];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 37 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 5 # Entry in intout
contrl+12 contrl[6] handle
intout intout[0..4] attrib[0..4]

7.6.3 vqf_bg_color

Name: »Inquire background colour« - Obtain object background colour.
 
Opcode: 203 (Sub-Opcode 1)
 
Syntax: int32_t vqf_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Description: The call vqf_bg_color obtains the background colour for graphic objects.
 
Parameter Meaning
   
handle Workstation identifier
bg_color COLOR_ENTRY of background colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.4 Bindings for vqf_bg_color

C: int32_t vqf_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Binding:
 
int32_t vqf_bg_color( int16_t handle, COLOR_ENTRY *bg_color )
{
   contrl[0] = 203;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 1;
   contrl[6] = handle;

   vdi ();

   bg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 203 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+10 contrl[5] 1 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] bg_color

7.6.5 vqf_fg_color

Name: »Inquire Foreground Color« - Obtain object foreground colour.
 
Opcode: 202 (Sub-Opcode 1)
 
Syntax: int32_t vqf_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Description: The call vqf_fg_color obtains the foreground colour for graphic objects.
 
Parameter Meaning
   
handle Workstation identifier
fg_color COLOR_ENTRY of foreground colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.6 Bindings for vqf_fg_color

C: int32_t vqf_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Binding:
 
int32_t vqf_fg_color( int16_t handle, COLOR_ENTRY *fg_color )
{
   contrl[0] = 202;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 1;
   contrl[6] = handle;

   vdi ();

   fg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 202 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+10 contrl[5] 1 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] fg_color

7.6.7 vqin_mode

Name: »Inquire Input Mode« - Obtain the input mode for an input device.
 
Opcode: 115
 
Syntax: void vqin_mode ( int16_t handle, int16_t dev_type, int16_t *input_mode );
 
Description: The call vqin_mode obtains the input status for a specified VDI input device. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
dev_type Logical input device:
1 = Locator (mouse, mouse buttons and keyboard)
2 = Valuator device (cursor)
3 = Selector devices (function keys)
4 = Alphanumeric devices (keyboard)
input_mode Input mode:
1 = Request
2 = Sample
Return value: The function does not return a result.
 
Availability: Supported by all Atari computers.
 
Group: Inquire functions
 
See also: Binding   vsin_mode   vrq_locator   vsm_locator   vrq_valuator   vsm_valuator   vrq_choice   vsm_choice   vrq_string   vsm_string
 

7.6.8 Bindings for vqin_mode

C: void vqin_mode ( int16_t handle, int16_t dev_type, int16_t *input_mode );
 
Binding:
 
void vqin_mode (int16_t handle, int16_t dev_type,
                int16_t *input_mode)
{
   intin[0] = dev_type;

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

   vdi ();

   *input_mode = intout[0];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 115 # 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] dev_type
intout intout[0] input_mode

7.6.9 vql_attributes

Name: »Inquire Current Polyline Attributes« - Obtain the attributes for drawing lines.
 
Opcode: 35
 
Syntax: void vql_attributes ( int16_t handle, int16_t *attrib );
 
Description: The call vql_attributes returns the settings that affect the attributes of the current line drawing functions.
 
Parameter Meaning
   
handle Workstation identifier
attrib[0] Line type (see vsl_type)
attrib[1] Line colour (see vsl_color)
attrib[2] Writing mode (see vswr_mode)
attrib[3] Current line width (see vsl_width)
attrib[4] End style for start of lines (see vsl_ends)
attrib[5] End style for end of lines (see vsl_ends)

Note: The statements made here (specially for attrib[4,5]) apply for the NVDI implementation.
 
Return value: The function does not return a result.
 
Availability: Supported by all drivers.
 
Group: Inquire functions
 
See also: Binding   vswr_mode   vs_color   vsl_type   vsl_width   vsl_color   vsl_ends
 

7.6.10 Bindings for vql_attributes

C: void vql_attributes ( int16_t handle, int16_t *attrib );
 
Binding:
 
void vql_attributes (int16_t handle, int16_t *attrib)
{
   contrl[0] = 35;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[6] = handle;

   vdi ();

   attrib[0..2] = intout[0..2];
   attrib[3]    = ptsout[0];
   attrib[4..5] = intout[3..4];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 35 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 1 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 5 # Entry in intout
contrl+12 contrl[6] handle
intout intout[0..4] attrib[0..2, 4..5]
ptsout ptsout[0] attrib[3]
ptsout+2 ptsout[1] 0

7.6.11 vql_bg_color

Name: »Inquire Background Color« - Obtain lines background colour.
 
Opcode: 203 (Sub-Opcode 2)
 
Syntax: int32_t vql_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Description: The call vql_bg_color obtains the background colour for lines.
 
Parameter Meaning
   
handle Workstation identifier
bg_color COLOR_ENTRY of background colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.12 Bindings for vql_bg_color

C: int32_t vql_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Binding:
 
int32_t vql_bg_color( int16_t handle, COLOR_ENTRY *bg_color )
{
   contrl[0] = 203;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 2;
   contrl[6] = handle;

   vdi ();

   bg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 203 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+10 contrl[5] 2 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] bg_color

7.6.13 vql_fg_color

Name: »Inquire Foreground Color« - Obtain lines foreground colour.
 
Opcode: 202 (Sub-Opcode 2)
 
Syntax: int32_t vql_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Description: The call vql_fg_color obtains the foreground colour for lines.
 
Parameter Meaning
   
handle Workstation identifier
fg_color COLOR_ENTRY of foreground colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.14 Bindings for vql_fg_color

C: int32_t vql_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Binding:
 
int32_t vql_fg_color( int16_t handle, COLOR_ENTRY *fg_color )
{
   contrl[0] = 202;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 2;
   contrl[6] = handle;

   vdi ();

   fg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 202 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+10 contrl[5] 2 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] fg_color

7.6.15 vqm_attributes

Name: »Inquire current polymarker attributes« - Obtain the attributes for drawing the markers.
 
Opcode: 36
 
Syntax: void vqm_attributes ( int16_t handle, int16_t *attrib );
 
Description: The call vqm_attributes obtains the current marker attributes for output. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
attrib[0] Current marker type
Some version of the ATARI-VDI wrongly return the type off-by-1 (0 for DOT etc.) EmuTOS also mimics this behaviour.
attrib[1] Current marker colour
attrib[2] Current writing mode
attrib[3] Current marker height
attrib[4] Current marker width

Note: The specifications made here are valid for the implementation in NVDI and PC-GEM.
 
Return value: The function does not return a result.
 
Availability: Supported by all drivers.
 
Group: Inquire functions
 
See also: Binding   vswr_mode   vs_color   vsm_type   vsm_height   vsm_color
 

7.6.16 Bindings for vqm_attributes

C: void vqm_attributes ( int16_t handle, int16_t *attrib );
 
Binding:
 
void vqm_attributes (int16_t handle, int16_t *attrib)
{
   contrl[0] = 36;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[6] = handle;

   vdi ();

   attrib[0..2] = intout[0..2];
   attrib[3]    = ptsout[1];
   attrib[4]    = ptsout[0];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 36 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 1 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 3 # Entry in intout
contrl+12 contrl[6] handle
intout intout[0..2] attrib[0..2]
ptsout ptsout[0] attrib[4]
ptsout+2 ptsout[1] attrib[3]

7.6.17 vqm_bg_color

Name: »Inquire background colour« - Obtain marker background colour.
 
Opcode: 203 (Sub-Opcode 3)
 
Syntax: int32_t vqm_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Description: The call vqm_bg_color obtains the background colour for markers.
 
Parameter Meaning
   
handle Workstation identifier
bg_color COLOR_ENTRY of background colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.18 Bindings for vqm_bg_color

C: int32_t vqm_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Binding:
 
int32_t vqm_bg_color( int16_t handle, COLOR_ENTRY *bg_color )
{
   contrl[0] = 203;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 3;
   contrl[6] = handle;

   vdi ();

   bg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 203 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+10 contrl[5] 3 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] bg_color

7.6.19 vqm_fg_color

Name: »Inquire Foreground Color« - Obtain marker foreground colour.
 
Opcode: 202 (Sub-Opcode 3)
 
Syntax: int32_t vqm_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Description: The call vqm_fg_color obtains the foreground colour for markers.
 
Parameter Meaning
   
handle Workstation identifier
fg_color COLOR_ENTRY of foreground colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.20 Bindings for vqm_fg_color

C: int32_t vqm_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Binding:
 
int32_t vqm_fg_color( int16_t handle, COLOR_ENTRY *fg_color )
{
   contrl[0] = 202;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 3;
   contrl[6] = handle;

   vdi ();

   fg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 202 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+10 contrl[5] 3 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] fg_color

7.6.21 vqr_bg_color

Name: »Inquire background colour« - Obtain bitmap background colour.
 
Opcode: 203 (Sub-Opcode 4)
 
Syntax: int32_t vqr_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Description: The call vqr_bg_color obtains the background colour for bitmaps.
 
Parameter Meaning
   
handle Workstation identifier
bg_color COLOR_ENTRY of background colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.22 Bindings for vqr_bg_color

C: int32_t vqr_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Binding:
 
int32_t vqr_bg_color( int16_t handle, COLOR_ENTRY *bg_color )
{
   contrl[0] = 203;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 4;
   contrl[6] = handle;

   vdi ();

   bg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 203 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+10 contrl[5] 4 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] bg_color

7.6.23 vqr_fg_color

Name: »Inquire foreground colour« - Obtain bitmap foreground colour.
 
Opcode: 202 (Sub-Opcode 4)
 
Syntax: int32_t vqr_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Description: The call vqr_fg_color obtains the foreground colour for bitmaps.
 
Parameter Meaning
   
handle Workstation identifier
fg_color COLOR_ENTRY of foreground colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.24 Bindings for vqr_fg_color

C: int32_t vqr_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Binding:
 
int32_t vqr_fg_color( int16_t handle, COLOR_ENTRY *fg_color )
{
   contrl[0] = 202;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 4;
   contrl[6] = handle;

   vdi ();

   fg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 202 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+10 contrl[5] 4 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] fg_color

7.6.25 vqt_advance

Name: »Inquire outline text advance placement vector« - Obtain position for the next vector character.
 
Opcode: 247
 
Syntax: void vqt_advance ( int16_t handle, int16_t ch, int16_t *x_advance, int16_t *y_advance, int16_t *remx, int16_t *remy );
 
Description: The call vqt_advance calculates offsets (advance vector and remainder) to be able to write the next character of a string at the correct position. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
ch Character of interest
x_advance X-spacing in pixels
y_advance Y-spacing in pixels
remx X-decimal remainder (mod 16384)
remy Y-decimal remainder (mod 16384)

Notes: x_advance and y_advance added to the position where the last character was rendered gives the place where to draw the next character. The vector works in all directions and with all text rotations.
 
The function is required particularly when the angle for text rotation is anything but 0, 90, 180 or 270 degrees.
 
The returned values refer only to the spacing that is used for the positioning of the next character, i.e. x_advance does not include any parts of a character that overhangs the em-square.
 
The remx and remy remainders should be summed by the application outputting the text and used to nudge the advance vector by a pixel when required.
 
Return value: The function does not return a result.
 
Availability: FSMGDOS, as of SpeedoGDOS 4.00 and from NVDI 3.00 on.
 
Group: Inquire functions
 
See also: Binding   vqt_advance32   vst_rotation   SpeedoGDOS   NVDI
 

7.6.26 Bindings for vqt_advance

C: void vqt_advance ( int16_t handle, int16_t ch, int16_t *x_advance, int16_t *y_advance, int16_t *remx, int16_t *remy );
 
Binding:
 
void vqt_advance ( int16_t handle, int16_t ch,
                   int16_t *x_advance, int16_t *y_advance,
                   int16_t *remx, int16_t *remy );
{
   intin[0] = ch;

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

   vdi ();

   x_advance = ptsout[0];
   y_advance = ptsout[1];
   remx      = ptsout[2];
   remy      = ptsout[3];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 247 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 4 # 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] ch
ptsout ptsout[0] x_advance
ptsout+2 ptsout[1] y_advance
ptsout+4 ptsout[2] remx
ptsout+6 ptsout[3] remy

The returned values refer only to the spacing that is used for the positioning of the next character, i.e. x_advance does not include any parts of a character that overhangs the em-square.
 

7.6.27 vqt_advance32

Name: »Inquire outline text advance placement vector« - Obtain more precise position for the next vector character as two fix31 values.
 
Opcode: 247
 
Syntax: void vqt_advance32 ( int16_t handle, int16_t ch, fix31 *x_advance, fix31 *y_advance );
 
Description: The call vqt_advance32 is a variant of vqt_advance calculating offsets (advance vector and remainder) to be able to write the next character of a string at the correct position, returned with greater precision as two fix31 values. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
ch Character of interest
x_advance X-advance in 1/65536 pixels
y_advance Y-advance in 1/65536 pixels

Notes: x_advance and y_advance added to the position where the last character was rendered gives the place where to draw the next character. The vector works in all directions and with all text rotations.
 
The function is required particularly when the angle for text rotation is anything but 0, 90, 180 or 270 degrees.
 
Remember that x_advance and y_advance are only offsets used to place the next character - they do not include parts of the character which extend beyond the em-square.
 
Return value: The function does not return a result.
 
Availability: As of SpeedoGDOS 4.00 and as of NVDI 3.00. In the docs for NVDI 3.00 this function is wrongly named as vqt_advance (it was corrected in the NVDI 4.00 docs).
 
Group: Inquire functions
 
See also: Binding   vst_rotation   SpeedoGDOS   NVDI
 

7.6.28 Bindings for vqt_advance32

C: void vqt_advance32 ( int16_t handle, int16_t ch, fix31 *x_advance, fix31 *y_advance );
 
Binding:
 
void vqt_advance32 (int16_t handle, int16_t ch,
                   fix31 *x_advance, fix31 *y_advance)
{
   intin[0] = ch;

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

   vdi ();

   *x_advance = ptsout[4..5];
   *y_advance = ptsout[6..7];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 247 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 4 # 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] ch
ptsout+8 ptsout[4..5] x_advance
ptsout+12 ptsout[6..7] y_advance

Remember that x_advance and y_advance are only offsets used to place the next character - they do not include parts of the character which extend beyond the em-square.
 

7.6.29 vqt_attributes

Name: »Inquire current graphic text attributes« - Obtain the attributes for the writing of texts.
 
Opcode: 38
 
Syntax: void vqt_attributes ( int16_t handle, int16_t *attrib );
 
Description: The call vqt_attributes obtains the current text attributes. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
attrib[0] Font ID
attrib[1] Text colour index
attrib[2] Text rotation in 1/10 of a degree
attrib[3] Horizontal alignment:
0 = Flushed left
1 = Centered
2 = Flushed right
attrib[4] Vertical alignment:
0 = Baseline
1 = Half line
2 = Ascent line
3 = Bottom line
4 = Descent line
5 = Top line
attrib[5] Writing mode:
Some version of the ATARI-VDI wrongly return the writing mode off-by-1 (0 for REPLACE etc.) EmuTOS also mimics this behaviour.
attrib[6] Character width
attrib[7] Character height
attrib[8] Character cell width
attrib[9] Character cell height
Return value: The function does not return a result.
 
Availability: Supported by all drivers.
 
Group: Inquire functions
 
See also: Binding   vswr_mode   vs_color   vst_height   vst_point   vst_rotation   vst_font   vst_color   vst_effects   vst_alignment
 

7.6.30 Bindings for vqt_attributes

C: void vqt_attributes ( int16_t handle, int16_t *attrib );
 
Binding:
 
void vqt_attributes (int16_t handle, int16_t *attrib)
{
   contrl[0] = 38;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[6] = handle;

   vdi ();

   attrib[0..5] = intout[0..5];
   attrib[6..9] = ptsout[0..3];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 38 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 2 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+12 contrl[6] handle
intout intout[0..5] attrib[0..5]
ptsout ptsout[0..3] attrib[6..9]

Note: The Atari-VDI wrongly returns the writing mode -1 in intout[5]; with NVDI, this occurs only when error compatibility is switched on.
 

7.6.31 vqt_bg_color

Name: »Inquire background colour« - Obtain text background colour.
 
Opcode: 203 (Sub-Opcode 0)
 
Syntax: int32_t vqt_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Description: The call vqt_bg_color obtains the background colour for text.
 
Parameter Meaning
   
handle Workstation identifier
bg_color COLOR_ENTRY of background colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.32 Bindings for vqt_bg_color

C: int32_t vqt_bg_color( int16_t handle, COLOR_ENTRY *bg_color );
 
Binding:
 
int32_t vqt_bg_color( int16_t handle, COLOR_ENTRY *bg_color )
{
   contrl[0] = 203;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 0;
   contrl[6] = handle;

   vdi ();

   bg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 203 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 6 # Entry in intout
contrl+10 contrl[5] 0 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] bg_color

7.6.33 vqt_cachesize

Name: »Get outline cache size« - Obtain the size of the vector character cache.
 
Opcode: 255
 
Syntax: void vqt_cachesize ( int16_t handle, int16_t which_cache, int32_t *size );
 
Description: The call vqt_cachesize obtains the size of the largest allocatable block of memory in one of two vector character caches. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
which_cache Cache:
0 = Character bitmap cache
1 = Cache for data structure
size Size of largest allocatable block of memory in the selected cache

Notes: An application can estimate how much memory is needed to generate a character, and issue a warning message if one tries to exceed this. FSMGDOS will just put a message on the screen asking the user to reboot.
 
To estimate the memory required for a given character in the character bitmap cache use the formula:
 
(Width in pixels + 7)/8 * height in pixels
 
The amount of memory for the data structure cache can be estimated from:
 
84 * (width + height)
 
Return value: The function does not return a result.
 
Availability: FSMGDOS, as of SpeedoGDOS 4.00.
 
Group: Inquire functions
 
See also: Binding   v_loadcache   v_savecache   v_flushcache
 

7.6.34 Bindings for vqt_cachesize

C: void vqt_cachesize ( int16_t handle, int16_t which_cache, int32_t *size );
 
Binding:
 
void vqt_cachesize ( int16_t handle, int16_t which_cache,
                     int32_t *size );
{
   intin[0] = which_cache;

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

   vdi ();

   *size = intout[0..1];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 255 # 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] 2 # Entry in intout
contrl+12 contrl[6] handle
intout intout[0] Returnwert

7.6.35 vqt_char_index

Name: »Inquire character index« - Convert an index with reference to given mappings.
 
Opcode: 190 (Opcode 0)
 
Syntax: uint16_t vqt_char_index ( int16_t handle, uint16_t scr_index, int16_t src_mode, int16_t dst_mode );
 
Description: The call vqt_char_index converts a passed character index from and to the desired mapping encoding.
 
Parameter Meaning
   
handle Workstation identifier
src_index Index to be converted
src_mode Type of source mapping:
0 = scr_index is a direct index
1 = scr_index is an ASCII index
2 = scr_index is a Unicode index
dst_mode Type of destination mapping:
0 = is a direct index
1 = is an ASCII index
2 = is a Unicode index

Note: If you want to convert an index from ASCII to ASCII, only the range from 32 to 255 is used. The control codes are not translated, e.g. a call like vqt_char_index( handle, 10, 1, 0 ) returns 0xffff.
 
For example, to determine if the font contains a character with Unicode 0x201e ("quotedblbase", DOUBLE LOW-9 QUOTATION MARK), you should use the following function:
 
int16_t is_char_available (int16_t handle, uint16_t unicode)
{
   uint16_t dindex;

   /* Translate unicode into a direct index */
   dindex = vqt_char_index (handle, unicode, 2, 0);

   if (dindex == 0xffff)
      return (FALSE);        /* Character is available */
   else
      return (TRUE);         /* Not available */
}
Return value: This function returns the converted index, or the value 0xffff if conversion was not possible.
 
Availability: since NVDI Version 4.00
 
Group: Inquire functions
 
See also: Binding   vst_charmap
 

7.6.36 Bindings for vqt_char_index

C: uint16_t vqt_char_index ( int16_t handle, uint16_t scr_index, int16_t src_mode, int16_t dst_mode );
 
Binding:
 
uint16_t vqt_char_index ( int16_t handle, uint16_t scr_index,
                          int16_t scr_mode, int16_t dst_mode )
{
   intin[0] = scr_index;
   intin[1] = src_mode;
   intin[2] = dst_mode;

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

   vdi ();

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

Address Element Contents
contrl contrl[0] 190 # 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] 0
contrl+12 contrl[6] handle
intin intin[0] scr_index
intin+2 intin[1] scr_mode
intin+4 intin[2] dst_mode
intout intout[0] Return Value

7.6.37 vqt_devinfo

Name: »Inquire device status info« - Inquire status of the output device.
 
Opcode: 248
 
Syntax: void vqt_devinfo ( int16_t handle, int16_t device, int16_t *devexits, int8_t *devname );
 
Description: The call vqt_devinfo checks whether a driver for a given output device has been installed. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
device Device ID (0..99)
devexits
-1 = Error
 0 = Device not installed
 1 = Device installed
devname Device name
Return value: The function does not return a result.
 
Availability: Only with FONTGDOS, FSM or SpeedoGDOS.
 
Group: Inquire functions
 
See also: Binding   vq_devinfo   vq_ext_devinfo   GDOS   SpeedoGDOS   NVDI
 

7.6.38 Bindings for vqt_devinfo

C: void vqt_devinfo ( int16_t handle, int16_t device, int16_t *devexits, int8_t *devname );
 
Binding:
 
void vqt_devinfo ( int16_t handle, int16_t device,
                   int16_t *devexits, int8_t *devname )
{
   intin[0] = device;

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

   vdi ();

   *devexits = ptsout[0];
   p = contrl[4];
   dev_name[0..p-1]    = intout[0..p-1];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 248 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 1 # Entry in ptsout
contrl+6 contrl[3] 1 # Entry in intin
contrl+8 contrl[4] p # Entry in intout
contrl+12 contrl[6] handle
intin intin[0] device
intout intout[0..p-1] devname[0..p-1]
ptsout ptsout[0] devexits

7.6.39 vqt_extent

Name: »Inquire text extent« - Obtain the length of a text string.
 
Opcode: 116
 
Syntax: void vqt_extent ( int16_t handle, int8_t *string, int16_t *extent );
 
Description: The call vqt_extent returns the minimal bounding box of a string of text in pixels. Correct bounding information is also output for rotated text.
 
Example:
 


The function is passed the following parameters:
 
Parameter Meaning
   
handle Workstation identifier
string Character string
extent[0] X-coordinate, and
extent[1] Y-coordinate of the bottom left corner
extent[2] X-coordinate, and
extent[3] Y-coordinate of the bottom right corner
extent[4] X-coordinate, and
extent[5] Y-coordinate of the top right corner
extent[6] X-coordinate, and
extent[7] Y-coordinate of the top left corner

Notes: If the selected font is an outline (vector) font, the character widths (vqt_width) will be added and the string (especially the leftmost and the right-most character) might exceed the returned rectangle. For this reason it may be better to fall back on the vqt_f_extent function which provides more accurate information by taking special factors into account, or the vqt_real_extent function if working under NVDI.
 
In old GEM versions, incidentally, the function does not work correctly if the text string contains umlauts, as old GEM versions could not yet handle these properly.
 
Return value: The function does not return a result.
 
Availability: Supported by all drivers.
 
Group: Inquire functions
 
See also: Binding   vst_height   vst_point   vst_rotation   vst_font   vst_effects   vqt_f_extent   vqt_real_extent
 

7.6.40 Bindings for vqt_extent

C: void vqt_extent ( int16_t handle, int8_t *string, int16_t *extent );
 
Binding:
 
void vqt_extent (int16_t handle, int8_t *string,
                 int16_t *extent)
{
   int16_t *tmp;

   tmp = intin;
   while (*tmp++ = *string++)
      ;

   contrl[0] = 116;
   contrl[1] = 0;
   contrl[3] = (int16_t) ((tmp-intin)-1);
   contrl[6] = handle;

   vdi ();

   extent[0..7] = ptsout[0..7];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 116 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 4 # Entry in ptsout
contrl+6 contrl[3] n # Entry in intin
contrl+8 contrl[4] 0 # Entry in intout
contrl+12 contrl[6] handle
intin intin[0..n-1] string[0..n-1]
ptsout ptsout[0..7] extent[0..7]

7.6.41 vqt_ext_name

Name: »Inquire face name and index« - Obtain information about a font.
 
Opcode: 130 (Sub-Opcode 1)
 
Syntax: int16_t vqt_ext_name ( int16_t handle, int16_t index, int8_t *name, uint16_t *font_format, uint16_t *flags );
 
Description: The call vqt_ext_name obtains information about a font (or face). The following apply:
 
Parameter Meaning
   
handle Workstation identifier
index Index (1 - number of fonts)
name[0..31] Font name
name[32] Flags:
0 = Bitmap font
1 = Vector font
font_format Font format:
Bit-0 = Bitmap font
Bit-1 = Speedo font
Bit-2 = TrueType font
Bit-3 = Type-1 font
flags Type of font:
Bit-0
= 0 (Proportional font)
= 1 (Monospaced font)
Bit-4 as of NVDI 4.1 (27.11.1996)
= 0 (Font ist not a symbol font)
= 1 (Font is a symbol font)

Note: A font is classified as a symbol font when it is not complete in the region 'A'-'Z' and 'a'-'z', or if it is pictorial according to the PANOSE classification. The relevant flag is therefore to be treated only as a clue (it would also be set for a cyrillic TrueType font, for instance), and signals that the character assignments correspond to ASCII mapping (vst_charmap) and not the normal Atari assignments.
 
Return value: The function returns the ID of the font.
 
Availability: As of NVDI 3.00.
 
Group: Inquire functions
 
See also: Binding   vst_load_fonts   vst_font   vqt_xfntinfo
 

7.6.42 Bindings for vqt_ext_name

C: int16_t vqt_ext_name ( int16_t handle, int16_t index, int8_t *name, uint16_t *font_format, uint16_t *flags );
 
Binding:
 
int16_t vqt_ext_name (int16_t handle, int16_t index,
                      int8_t *name, uint16_t *font_format,
                      uint16_t *flags)
{
   intin[0] = index;
   intin[1] = 0;         /* Reserved */

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

   vdi ();

   name[0..31]  = intout[1..32];
   name[32]     = intout[33];
   *flags       = (intout[34] >> 8) & 0xff;
   *font_format = intout[34] & 0xff;

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

Address Element Contents
contrl contrl[0] 130 # 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] 35 # Entry in intout
contrl+10 contrl[5] 1 # Sub-opcode
contrl+12 contrl[6] handle
intin intin[0] index
intin+2 intin[1] 0
intout intout[0] Return Value
intout+2 intout[1..16] name[0..31]
intout+64 intout[33] name[32]
intout+66 intout[34] flags/font_format

Notes: The high byte of intout[34] returns flags; the low byte of intout[34] returns font_format.
 
To ascertain what type of font one is dealing with, one has to note the number of entries in intout (contrl[4]). If contrl[4] is 33, then no additional information is present, and hence we are dealing with a bitmap font. If contrl[4] == 34, then additionally intout[33] (name[32]) just communicates whether we are dealing with a vector font. Only if contrl[4] == 35, one can ascertain from intout[34] (flags) the font type more exactly, and recognize immediately whether the font is monospaced.
 
intout[34] is only returned when contrl[3] > 1 and contrl[5] = 1!
 

7.6.43 vqt_fg_color

Name: »Inquire foreground colour« - Obtain text foreground colour.
 
Opcode: 202 (Sub-Opcode 0)
 
Syntax: int32_t vqt_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Description: The call vqt_fg_color obtains the foreground colour for text.
 
Parameter Meaning
   
handle Workstation identifier
fg_color COLOR_ENTRY of foreground colour
Return value: Set colour space (at present only CSPACE_RGB), or -1 (invalid subfunction number).
 
Availability: As of NVDI 5.00.
 
Group: Inquire functions
 
See also: Binding
 

7.6.44 Bindings for vqt_fg_color

C: int32_t vqt_fg_color( int16_t handle, COLOR_ENTRY *fg_color );
 
Binding:
 
int32_t vqt_fg_color( int16_t handle, COLOR_ENTRY *fg_color )
{
   contrl[0] = 202;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[5] = 0;
   contrl[6] = handle;

   vdi ();

   fg_color = intout [2..5];
   return ( int32_t intout [0]  );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 202 # Function Opcode
contrl+2 contrl[1] 0 # entry in ptsin
contrl+4 contrl[2] 0 # entry in ptsout
contrl+6 contrl[3] 0 # entry in intin
contrl+8 contrl[4] 6 # entry in intout
contrl+10 contrl[5] 0 # Sub-opcode
contrl+12 contrl[6] handle
intout intout[0..1] color_space
intout+4 intout[2..5] fg_color

7.6.45 vqt_fontheader

Name: »Inquire Speedo header information« - Obtain information about a Speedo font.
 
Opcode: 232
 
Syntax: void vqt_fontheader ( int16_t handle, int8_t *buffer, int8_t *tdf_name );
 
Description: The call vqt_fontheader copies the header of the current Speedo font file into buffer and returns a pointer to the TDF file.
 
Parameter Meaning
   
handle Workstation identifier
buffer Font header
tdf_name Name and path of the TDF file

Notes: The buffer should have a size of 1 kbyte, as the header size depends on the font and extensions of the font format. tdf_name should point to a buffer of at least 128 bytes into which the full pathname of the font's TDF file will be copied.
 
If the selected (vector) font is not a Speedo font (TrueType, ...) the VDI tries to create a virtual header with the important information.
 
You should consider that each vqt_fontheader call can lead to several disk accesses (depending on the font format) - if a user has installed 300 or more fonts (which can happen very easily if you use high quality fonts with a lot of font styles), this will take a few seconds. If necessary, save font information and load (and update) it when your program is started.
 
Return value: The function does not return a result.
 
Availability: As of SpeedoGDOS 4.00, and from NVDI 3.00 onwards.
 
Group: Inquire functions
 
See also: Binding   vqt_fontinfo   Make-up of the font-header
 

7.6.46 Bindings for vqt_fontheader

C: void vqt_fontheader ( int16_t handle, int8_t *buffer, int8_t *tdf_name );
 
Binding:
 
void vqt_fontheader (int16_t handle, int8_t *buffer,
                     int8_t *tdf_name)
{
   intin[0..1] = buffer;

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

   vdi ();

   tdf_name[0..n-1] = intout[0..n-1];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 232 # 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] n # Entry in intout
contrl+12 contrl[6] handle
intin intin[0..1] buffer
intout intout[0..n-1] tdf_name[0..n-1]

7.6.47 vqt_fontinfo

Name: »Inquire current face information« - Obtain information about the current font.
 
Opcode: 131
 
Syntax: void vqt_fontinfo ( int16_t handle, int16_t *minADE, int16_t *maxADE, int16_t *distances, int16_t *maxwidth, int16_t *effects );
 
Description: The call vqt_fontinfo returns information about the current font.
 


The function is passed the following parameters:
 
Parameter Meaning
   
handle Workstation identifier
minADE Minimum character index
maxADE Maximum character index
distances[0] Distance of bottom line to baseline
distances[1] Distance of descent line to baseline
distances[2] Distance of half line to baseline
distances[3] Distance of ascent line to baseline
distances[4] Distance of top line to baseline
max_width Maximum character cell width
effects[0] Additional character width due to text effects
effects[1] Left offset of skewed text
effects[2] Right offset of skewed text

Note: Special effects and enlargement are taken into account. With skewed text (pseudo-italic) the slope is best considered as a right and a left offset value. The right offset value is the horizontal distance between the character position (left end of baseline) to the plumb-line (drop-down) point on the baseline from the top right corner of the bounding box; similarly, the left offset value is the distance from the character position to the plumb-line point from the baseline to where it would meet the bottom left corner of the character's bounding box.
 
The components minADE and maxADE represent the first and last character of the font respectively.
 
Return value: The function does not return a result.
 
Availability: Supported by all drivers.
 
Group: Inquire functions
 
See also: Binding   vst_effects   ASCII table
 

7.6.48 Bindings for vqt_fontinfo

C: void vqt_fontinfo ( int16_t handle, int16_t *minADE, int16_t *maxADE, int16_t *distances, int16_t *maxwidth, int16_t *effects );
 
Binding:
 
void vqt_fontinfo (int16_t handle, int16_t *minADE,
                   int16_t *maxADE, int16_t *distances,
                   int16_t *maxwidth, int16_t *effects)
{
   contrl[0] = 131;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[6] = handle;

   vdi ();

   *minADE    = intout[0];
   *maxADE    = intout[1];
   *max_width = ptsout[0];

   distances[0] = ptsout[1];
   distances[1] = ptsout[3];
   distances[2] = ptsout[5];
   distances[3] = ptsout[7];
   distances[4] = ptsout[9];

   effects[0] = ptsout[2];
   effects[1] = ptsout[4];
   effects[2] = ptsout[6];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 131 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 5 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 2 # Entry in intout
contrl+12 contrl[6] handle
intout intout[0] minADE
intout+2 intout[1] maxADE
ptsout ptsout[0] maxwidth
ptsout+2 ptsout[1] distances[0]
ptsout+4 ptsout[2] effects[0]
ptsout+6 ptsout[3] distances[1]
ptsout+8 ptsout[4] effects[1]
ptsout+10 ptsout[5] distances[2]
ptsout+12 ptsout[6] effects[2]
ptsout+14 ptsout[7] distances[3]
ptsout+16 ptsout[8] 0
ptsout+18 ptsout[9] distances[4]

7.6.49 vqt_f_extent

Name: »Inquire outline font text extent« - Obtain the length of a string in a vector font.
 
Opcode: 240
 
Syntax: void vqt_f_extent ( int16_t handle, int8_t *string, int16_t *extent );
 
Description: The call vqt_f_extent adds the character widths of a string of text in a vector font, working to a precision of 1/65536 pixels, and returns the bounding box needed to enclose a text string (in pixels). The following apply:
 
Parameter Meaning
   
handle Workstation identifier
string Character string
extent[0] X-coordinate, and
extent[1] Y-coordinate of the bottom left corner
extent[2] X-coordinate, and
extent[3] Y-coordinate of the bottom right corner
extent[4] X-coordinate, and
extent[5] Y-coordinate of the top right corner
extent[6] X-coordinate, and
extent[7] Y-coordinate of the top left corner

Note: Unlike vqt_extent, this function also respects possible kerning values, and takes the remainders generated by outline fonts into account, so providing far more accurate results.
 
Attention: This function does not return the bounding box of the string. It adds only the advance widths of the characters. You should use this function to determine the position of the text cursor. If you would like to use it to determine the maximum size of the redraw area you should add the maximum character width the leftmost and rightmost coordinates of the box (if the text is skewed you should also add the skewing offset). To determine a more exact bounding box you should call vqt_real_extent.
 
Important: If the text is rotated by 90, 180 or 270 degrees, this function works as senselessly as vqt_extent: It changes the reference point of the coordinate system. In all other cases it works as you would expect it to.
 
As of NVDI 3 it is recommended to use the function vqt_real_extent instead.
 
Return value: The function does not return a result.
 
Availability: As of SpeedoGDOS 4.00 and from NVDI 3.00 onwards.
 
Group: Inquire functions
 
See also: Binding   vqt_extent   SpeedoGDOS   NVDI
 

7.6.50 Bindings for vqt_f_extent

C: void vqt_f_extent ( int16_t handle, int8_t *string, int16_t *extent );
 
Binding:
 
void vqt_f_extent (int16_t handle, int8_t *string,
                   int16_t *extent)
{
   intin[0..n-1] = string[0..n-1];

   contrl[0] = 240;
   contrl[1] = 0;
   contrl[3] = n;
   contrl[6] = handle;

   vdi ();

   extent[0..7] = ptsout[0..7];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 240 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 4 # Entry in ptsout
contrl+6 contrl[3] n # Entry in intin
contrl+8 contrl[4] 0 # Entry in intout
contrl+12 contrl[6] handle
intin intin[0..n-1] string[0..n-1]
ptsout ptsout[0..7] extent[0..7]

7.6.51 vqt_get_table

Name: »Get character mapping table« - Obtain address of the character transformation table.
 
Opcode: 254
 
Syntax: void vqt_get_table( int16_t handle, int32_t *map );
 
Description: The call vqt_get_table obtains the addresses of the transformation table that maps the Atari character set to the Bitstream and PostScript character indices. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
map Address where the character allocation table is to be found. The table consists of seven fields. Each has a size of 224 int16_t WORDS for the ASCII characters 32-255.
Field Table
1 Master mapping
2 Bitstream International Character Set
3 Bitstream International Symbol Set
4 Bitstream Dingbats Set
5 PostScript Text Set
6 PostScript Symbol Set
7 PostScript Dingbats Set

Note: This information can be useful as some vector fonts may contain characters that are not present in the normal Atari character set.
 
Return value: The function does not return a result.
 
Availability: As of SpeedoGDOS 4.00.
 
Group: Inquire functions
 
See also: Binding   GDOS   SpeedoGDOS   v_gtext
 

7.6.52 Bindings for vqt_get_table

C: void vqt_get_table ( int16_t handle, int32_t *map );
 
Binding:
 
void vqt_get_table ( int16_t handle, int32_t *map )
{
   contrl[0] = 254;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[6] = handle;

   vdi ();

   map = intout[0..1];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 254 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 2 # Entry in intout
contrl+12 contrl[6] handle
intout intout[0..1] map

7.6.53 vqt_justified

Name: »Inquire justified graphics text« - Obtain offsets for text characters from a reference point.
 
Opcode: 132
 
Syntax: void vqt_justified ( int16_t handle, int16_t x, int16_t y, int8_t *string, int16_t length, int16_t word_space, int16_t char_space, int16_t *offsets );
 
Description: The call vqt_justified obtains for each character of a graphics text string the X- and Y-offsets from a given reference point. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
x X-coordinate, and
y Y-coordinate of the reference point for text alignment
string Pointer to the character string
length Text length in pixels (ref. to X-axis)
word_space Inter-word spaces:
   0 = Do not stretch
<> 0 = Stretch
char_space Inter-character spaces:
   0 = Do not stretch
<> 0 = Stretch
offsets Contains the X- and Y-offsets for each character in text string
Return value: The function does not return a result.
 
Availability: PC-GEM as of Version 2.0.
 
Group: Inquire functions
 
See also: Binding
 

7.6.54 Bindings for vqt_justified

C: void vqt_justified ( int16_t handle, int16_t x, int16_t y, int8_t *string, int16_t length, int16_t word_space, int16_t char_space, int16_t *offsets );
 
Binding:
 
void vqt_justified (int16_t handle, int16_t x, int16_t y,
                    int8_t *string, int16_t length,
                    int16_t word_space, int16_t char_space,
                    int16_t *offsets)
{
   int16_t i;

   intin[0] = word_space;
   intin[1] = char_space;

   ptsin[0] = x;
   ptsin[1] = y;
   ptsin[2] = length;
   ptsin[3] = 0;

   i = 0;
   while (string[i++])
      ;

   contrl[0] = 132;
   contrl[1] = 2;
   contrl[3] = i;
   contrl[6] = handle;
   pooff = offsets;

   vdi ();

   pooff = ptsout;
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 132 # Function Opcode
contrl+2 contrl[1] 2 # Entry in ptsin
contrl+4 contrl[2] n # Entry in ptsout
contrl+6 contrl[3] 2+n # Entry in intin
contrl+8 contrl[4] 0 # Entry in intout
contrl+12 contrl[6] handle
intin intin[0] word_space
intin+2 intin[1] char_space
intin+4 intin[2] string[0..n+1]
ptsin ptsin[0] x
ptsin+2 ptsin[1] y
ptsin+4 ptsin[2] length
ptsin+6 ptsin[3] 0
ptsout ptsout[...] offsets[...]

7.6.55 vqt_name

Name: »Inquire face name and index« - Obtain the name and short description of a font.
 
Opcode: 130
 
Syntax: int16_t vqt_name ( int16_t handle, int16_t element_num, int8_t *name );
 
Description: The call vqt_name obtains the name and ID of a specified font face. The folowing apply:
 
Parameter Meaning
   
handle Workstation identifier
element_num Number of the font
name Name of the font as up to 32 characters long text string

Note: The element name[32] contains the value 0 if the font in question is a pixel font, and the value 1 if it is an outline (vector) font (from SpeedoGDOS 4.0)
 
In GEM/5, this function returns nothing for font index 0 or 1; for other indices, the font scaler is used to return data. A good test for a GEM/5 VDI would be to do a vqt_name on font 1, and see if it returned any values - if it did not, GEM/5 is running.
 
From NVDI 3 onwards there is an extended version of this function.
 
Return value: The function returns the ID of the font.
 
Availability: In all TOS versions, as of SpeedoGDOS 4.0 in extended version.
 
Group: Inquire functions
 
See also: Binding   vst_load_fonts   vst_name   vst_font   vqt_xfntinfo
 

7.6.56 Bindings for vqt_name

C: int16_t vqt_name ( int16_t handle, int16_t element_num, int8_t *name );
 
Binding:
 
int16_t vqt_name (int16_t handle, int16_t element_num,
                  int8_t *name)
{
   int16_t tmp;

   intin[0] = element_num;

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

   vdi ();

   for (tmp = 0; tmp < 32; tmp++)
      name[tmp] = intout[tmp+1];

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

Address Element Contents
contrl contrl[0] 130 # 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] 33 # Entry in intout
contrl+12 contrl[6] handle
intin intin[0] element_num
intout intout[0] Return Value
intout+2 intout[1..32] name[0..31]

7.6.57 vqt_name_and_id

Name: »Inquire face name and ID by name« - Search for font ID and name.
 
Opcode: 230 (Sub-Opcode 100)
 
Syntax: int16_t vqt_name_and_id ( int16_t handle, int16_t font_format, int8_t *font_name, int8_t *ret_name );
 
Description: The call vqt_name_and_id searches for a font with a given name and format. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
font_format Desired font format:
1 = Bitmap font
2 = Speedo font
4 = TrueType font
8 = Type-1 font
font_name Desired font name
ret_name Name of the found font

Note: Missing or extra spaces in the font name are ignored.
 
Return value: The function returns the ID of the font, or the value 0 if no corresponding font could be found.
 
Availability: As of NVDI Version 3.02 onwards.
 
Group: Inquire functions
 
See also: Binding   vst_name
 

7.6.58 Bindings for vqt_name_and_id

C: int16_t vqt_name_and_id ( int16_t handle, int16_t font_format, int8_t *font_name, int8_t *ret_name );
 
Binding:
 
int16_t vqt_name_and_id (int16_t handle, int16_t font_format,
                         int8_t *font_name, int8_t *ret_name)
{
   intin[0] = font_format;
   intin[1..n] = font_name[0..n-1];

   contrl[0] = 230;
   contrl[1] = 0;
   contrl[3] = n;
   contrl[5] = 100;
   contrl[6] = handle;

   vdi ();

   ret_name[0..m-1] = intout[1..m];
   return ( intout[0] );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 230 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] n # Entry in intin
contrl+8 contrl[4] m # Entry in intout
contrl+10 contrl[5] 100 # Sub-opcode
contrl+12 contrl[6] handle
intin intin[0] font_format
intin+2 intin[1..n] font_name[0..n-1]
intout intout[0] Return Value
intout+2 intout[1..m] ret_name[0..m-1]

7.6.59 vqt_pairkern

Name: »Inquire pair kerning information« - Obtain adjustment vector for character pairs when using pair kerning.
 
Opcode: 235
 
Syntax: void vqt_pairkern ( int16_t handle, int16_t ch1, int16_t ch2, fix31 *x, fix31 *y );
 
Description: The call vqt_pairkern obtains the adjustment vector for two adjacent characters if pair kerning is in use. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
ch1 Left member, and
ch2 Right member of character pair
x X-adjustment in 1/65536 pixels
y Y-adjustment in 1/65536 pixels

Note: If you want call vqt_pairkern from Pure C, you might have to write your own binding, because some releases of the PCGEMLIB return ptsout[0-3] instead of intout[0-3].
 
Return value: The function does not return a result.
 
Availability: As of SpeedoGDOS 4.0 and from NVDI 3.00 onwards.
 
Group: Inquire functions
 
See also: Binding   vqt_trackkern   SpeedoGDOS   NVDI   Kerning   Track kerning   Pair kerning
 

7.6.60 Bindings for vqt_pairkern

C: void vqt_pairkern ( int16_t handle, int16_t ch1, int16_t ch2, fix31 *x, fix31 *y );
 
Binding:
 
void vqt_pairkern (int16_t handle, int16_t ch1, int16_t ch2,
                   fix31 *x, fix31 *y)
{
   intin[0] = ch1;
   intin[1] = ch2;

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

   vdi ();

   *x = intout[0..1];
   *y = intout[2..3];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 235 # 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] 4 # Entry in intout
contrl+12 contrl[6] handle
intin intin[0] ch1
intin+2 intin[1] ch2
intout intout[0..1] x
intout+4 intout[2..3] y

7.6.61 vqt_real_extent

Name: »Inquire real outline font text extent« - Obtain the bounding box for an outline text.
 
Opcode: 240 (Sub-Opcode 4200)
 
Syntax: void vqt_real_extent ( int16_t handle, int16_t x, int16_t y, int8_t *string, int16_t *extent );
 
Description: The call vqt_real_extent obtains the minimum bounding box (possibly a quadrilateral rather than a rectangle) for an outline (vector) text, taking all text attributes into account.
 
Example:
 


The function is passed the following parameters:
 

Parameter Meaning
handle Workstation identifier
x X-coordinate, and
y Y-coordinate for start of text output
string Text string to be output
extent[0] X-coordinate, and
extent[1] Y-coordinate of bottom left corner
extent[2] X-coordinate, and
extent[3] Y-coordinate of bottom right corner
extent[4] X-coordinate, and
extent[5] Y-coordinate of top right corner
extent[6] X-coordinate, and
extent[7] Y-coordinate of top left corner

Note: This function respects all text effects, rotation, skewing, pair kerning, track kerning, characters which extend beyond the em square, and horizontal as well as vertical alignment.
 
Return value: The function does not return a result.
 
Availability: As of NVDI Version 3.00.
 
Group: Inquire functions
 
See also: Binding   vqt_extent   vqt_f_extent
 

7.6.62 Bindings for vqt_real_extent

C: void vqt_real_extent ( int16_t handle, int16_t x, int16_t y, int8_t *string, int16_t *extent );
 
Binding:
 
void vqt_real_extent (int16_t handle, int16_t x, int16_t y,
                      int8_t *string, int16_t *extent)
{
   intin[0..n-1] = string[0..n-1];
   ptsin[0] = x;
   ptsin[1] = y;

   contrl[0] = 240;
   contrl[1] = 1;
   contrl[3] = n;
   contrl[5] = 4200;
   contrl[6] = handle;

   vdi ();

   extent[0..7] = ptsout[0..7];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 240 # Function Opcode
contrl+2 contrl[1] E # Entry in ptsin
contrl+4 contrl[2] 4 # Entry in ptsout
contrl+6 contrl[3] n # Entry in intin
contrl+8 contrl[4] 0 # Entry in intout
contrl+10 contrl[5] 4200 # Sub-opcode
contrl+12 contrl[6] handle
intin intin[0..n-1] string[0..n-1]
ptsin ptsin[0] x
ptsin+2 ptsin[1] y
ptsout ptsout[0..7] extent[0..7]

7.6.63 vqt_trackkern

Name: »Inquire track kerning information« - Obtain adjustment vector for fonts with track kerning.
 
Opcode: 234
 
Syntax: void vqt_trackkern ( int16_t handle, fix31 *x, fix31 *y );
 
Description: The call vqt_trackkern obtains the adjustment vector per character for fonts with track kerning. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
x X-adjustment in 1/65536 pixels
y Y-adjustment in 1/65536 pixels
Return value: The function does not return a result.
 
Availability: As of SpeedoGDOS 4.0 and as of NVDI 3.00
 
Group: Inquire functions
 
See also: Binding   GDOS   SpeedoGDOS   vqt_pairkern
 

7.6.64 Bindings for vqt_trackkern

C: void vqt_trackkern ( int16_t handle, fix31 *x, fix31 *y );
 
Binding:
 
void vqt_trackkern (int16_t handle, fix31 *x, fix31 *y)
{
   contrl[0] = 234;
   contrl[1] = 0;
   contrl[3] = 0;
   contrl[6] = handle;

   vdi ();

   *x = intout[0..1];
   *y = intout[2..3];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 234 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] 4 # Entry in intout
contrl+12 contrl[6] handle
intout intout[0..1] x
intout+4 intout[2..3] y

7.6.65 vqt_width

Name: »Inquire character cell width« - Obtain the width of a character cell.
 
Opcode: 117
 
Syntax: int16_t vqt_width ( int16_t handle, int8_t character, int16_t *cell_width, int16_t *left_delta, int16_t *right_delta );
 
Description: The call vqt_width obtains the horizontal extent of a specified character in the current font as well as of the character cell, in pixels. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
character Index of specified character
cell_width Cell width of the character
left_delta Left character alignment delta
right_delta Right character alignment delta

Note: Special effects and rotation do not apply.
 
If one applies this function to a vector font, one only obtains the rounded-off step-size for the specified character as remainders are not taken into account. This step-size can be used only in connection with v_gtext. If one tries to apply these step-sizes to v_ftext, then wrong character positions will be calculated. It is recommended you use vqt_advance instead when inquiring about outline fonts.
 


To check whether a font is monospaced or proportional, you should use vqt_ext_name which returns extended font information (under NVDI only).
 
The values in left_delta and right_delta correspond exactly to the positions in the Horizontal offset table. If this specification is missing in the font header (which is the case for most bitmap fonts), then the return will be 0.
 
Return value: The function returns the index of character, or -1 if an error has occurred.
 
Availability: Supported by all drivers.
 
Group: Inquire functions
 
See also: Binding   vst_effects
 

7.6.66 Bindings for vqt_width

C: int16_t vqt_width ( int16_t handle, int8_t character, int16_t *cell_width, int16_t *left_delta, int16_t *right_delta );
 
Binding:
 
int16_t vqt_width (int16_t handle, int8_t character,
                   int16_t *cell_width, int16_t *left_delta,
                   int16_t *right_delta)
{
   intin[0] = character;

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

   vdi ();

   *cell_width  = ptsout[0];
   *left_delta  = ptsout[2];
   *right_delta = ptsout[4];

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

Address Element Contents
contrl contrl[0] 117 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 3 # 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] character
intout intout[0] Return Value
ptsout ptsout[0] cell_width
ptsout+2 ptsout[1] 0
ptsout+4 pstout[2] left_delta
ptsout+6 ptsout[3] 0
ptsout+8 ptsout[4] right_delta
ptsout+10 ptsout[5] 0

7.6.67 vqt_xfntinfo

Name: »Inquire extended font information« - Obtain extended information about a font.
 
Opcode: 229 (Opcode 0)
 
Syntax: int16_t vqt_xfntinfo ( int16_t handle, int16_t flags, int16_t id, int16_t index, XFNT_INFO *info );
 
Description: The call vqt_xfntinfo obtains information about a font as specified in flags. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
flags Desired information as bit-vector:
Bit-0 = Return the full font name (font_name)
Bit-1 = Return the name of the family (family_name)
Bit-2 = Return the style name (style_name)
Bit-3 = Return the file name (file_name1)
Bit-4 = Return the 2nd optional file name (file_name2)
Bit-5 = Return the 3rd optional file name (file_name3)
Bit-8 = Return the available point sizes (without enlargement) (pt_cnt, pt_sizes)
Bit-9 = Return the available point sizes (with enlargement) (pt_cnt, pt_sizes)
id Font ID, or 0 for the currently set font
index Index of the font, or 0 if the ID is already in use
info Address of the information structure

Note: If index is a non-zero value, vqt_xfntinfo searches for the correspoding font and returns the requested information. If index is zero, vqt_xfntinfo searches for the font specified by id. If index and id are zero, this function returns information about the current font.
 
Bit 8 and 9 of flags differ in their function only with bitmap fonts. If bit 8 is set, the returned point sizes are those that are present without enlargement. If bit 9 is set, then the returned point sizes are those that are enlarged.
 
Before you call this function, you have to set the length of the structure in the element size.
 
Return value: The function returns the requested information in a XFNT_INFO structure.
 
Availability: As of NVDI 3.02
 
Group: Inquire functions
 
See also: Binding   vqt_name
 

7.6.68 Bindings for vqt_xfntinfo

C: int16_t vqt_xfntinfo ( int16_t handle, int16_t flags, int16_t id, int16_t index, XFNT_INFO *info );
 
Binding:
 
int16_t vqt_xfntinfo (int16_t handle, int16_t flags,
                      int16_t id, int16_t index,
                      XFNT_INFO *info)
{
   intin[0] = flags;
   intin[1] = id;
   intin[2] = index;
   intin[3..4] = info;

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

   vdi ();

   return ( intout[1] );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 229 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 5 # Entry in intin
contrl+8 contrl[4] 3 # Entry in intout
contrl+10 contrl[5] 0
contrl+12 contrl[6] handle
intin intin[0] flags
intin+2 intin[1] id
intin+4 intin[2] index
intin+6 intin[3..4] info
intout intout[0] font_format
intout+2 intout[1] font_id
intout+4 intout[2] index

7.6.69 vq_cellarray

Name: »Inquire cell array« - Obtain information about a colour table displayed on-screen.
 
Opcode: 27
 
Syntax: void vq_cellarray ( int16_t handle, int16_t *pxyarray, int16_t row_length, int16_t num_rows, int16_t *el_used, int16_t *rows_used, int16_t *status, int16_t *colarray );
 
Description: The call vq_cellarray provides information about the definition of a colour selection cell array. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
pxyarray[0] X-coordinate, and
pxyarray[1] Y-coordinate of top left corner,
pxyarray[2] X-coordinate, and
pxyarray[3] Y-coordinate of bottom right corner of a VDI format rectangle
row_length Row length in colour index array
num_rows Number of rows in colour index array
el_used Number of elements used per row
rows_used Number of columns used in the colour index array
status
0 = No error, operation successful
1 = The colour values for some pixels could not be determined
colarray Colour index array that contains the colour information row-by-row, or -1 if the colour index for the specified region could not be obtained

Note: The function is not available on all devices.
 
Return value: The function does not return a result.
 
Availability: Not supported by any known drivers.
 
Group: Inquire functions
 
See also: Binding   v_cellarray
 

7.6.70 Bindings for vq_cellarray

C: void vq_cellarray ( int16_t handle, int16_t *pxyarray, int16_t row_length, int16_t num_rows, int16_t *el_used, int16_t *rows_used, int16_t *status, int16_t *colarray );
 
Binding:
 
void vq_cellarray (int16_t handle, int16_t *pxyarray,
                   int16_t row_length, int16_t num_rows,
                   int16_t *el_used, int16_t *rows_used,
                   int16_t *status, int16_t *colarray)
{
   ptsin[0..3] = pxarray[0..3];

   contrl[0] = 27;
   contrl[1] = 2;
   contrl[3] = 0;
   contrl[6] = handle;
   contrl[7] = row_length;
   contrl[8] = num_rows;

   vdi ();

   *el_used   = contrl[9];
   *rows_used = contrl[10];
   *status    = contrl[11];

   colarray[0..n-1] = intout[0..n-1];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 27 # Function Opcode
contrl+2 contrl[1] 2 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 0 # Entry in intin
contrl+8 contrl[4] n # Entry in intout
contrl+12 contrl[6] handle
contrl+14 contrl[7] row_length
contrl+16 contrl[8] num_rows
contrl+18 contrl[9] el_used
contrl+20 contrl[10] rows_used
contrl+22 contrl[11] status
ptsin ptsin[0..3] pxyarray[0..3]
intout intout[0..n-1] colarray[0..n-1]

7.6.71 vq_color

Name: »Inquire colour representation« - Obtain the RGB intensities for a particular colour index.
 
Opcode: 26
 
Syntax: int16_t vq_color ( int16_t handle, int16_t color_index, int16_t set_flag, int16_t *rgb );
 
Description: The call vq_color obtains the set RGB colour intensities of the colour palette. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
color_index Colour register index to be inquired
set_flag Flag for colour intensity:
0 = Return colour values last requested by user at vs_color
1 = Return realized colour values
rgb_in[0] Red colour intensity (in tenths of a percent, 0-1000)
rgb_in[1] Green colour intensity (in tenths of a percent, 0-1000)
rgb_in[2] Blue colour intensity (in tenths of a percent, 0-1000)

Notes: Set and actually realized colour intensities can be different on systems using a CLUT if the number of available colour steps is too small.
 
Example: If a monitor only offers two intensities, then its range divides into part-ranges 0..500 and 501..1000. The actual intensity can however only be 0 or 1000; no matter which number is selected from the range from 501 to 1000, the intensity of 1000 will be set every time; hence a set intensity can have the value of 623, say, and the actual one the value 1000.
 
With direct RGB (no CLUT), usually the actually set intensity as well as the intensity passed by the user will be returned, as the number of gradations is large enough.
 
Some colour printer drivers do not allow modifying the colour of each register. There is a simple test for checking if the driver permits you to change index colours:
 
  • Call vq_color with set_flag value of 0 and save the return
  • Call vs_color to modify that colour index by a significant value
  • Call vq_color with set_flag value of 0 and then compare it with what you set
  • Restore old value
  • If equivalent values are returned, you can modify each colour index
Return value: The function returns -1 if the specified index is out of range for the device; otherwise it does not return a result.
 
Availability: Supported by all drivers.
 
Group: Inquire functions
 
See also: Binding   vs_color   vs_color2
 

7.6.72 Bindings for vq_color

C: int16_t vq_color ( int16_t handle, int16_t color_index, int16_t set_flag, int16_t *rgb );
 
Binding:
 
int16_t vq_color (int16_t handle, int16_t color_index,
               int16_t set_flag, int16_t *rgb)
{
   intin[0] = color_index;
   intin[1] = set_flag;

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

   vdi ();

   rgb[0] = intout[1];
   rgb[1] = intout[2];
   rgb[2] = intout[3];

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

Address Element Contents
contrl contrl[0] 26 # 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] 4 # Entry in intout
contrl+12 contrl[6] handle
intin intin[0] color_index
intin+2 intin[1] set_flag
intout intout[0] Return Value
intout+2 intout[1..3] rgb[0..2]

7.6.73 vq_devinfo

Name: »Inquire device status info« - Inquire status of the output device.
 
Opcode: 248
 
Syntax: void vq_devinfo ( int16_t handle, int16_t device, int16_t *dev_open, int8_t *file_name, int8_t *device_name );
 
Description: The call vq_devinfo checks whether a driver for a given output device has been installed. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
device Device ID (0..99)
dev_open Driver:
0 = is closed
1 = is already open
file_name Filename of the driver
device_name Readable device name

Note: If the filename is empty, there is no driver with the given ID device.
 
The function reports both the name of the driver (say "XVGA256.SYS") as well as the 'readable' name ("VGA 256 colours").
 
Return value: The function does not return a result.
 
Availability: As of NVDI 3.00.
 
Group: Inquire functions
 
See also: Binding   vq_ext_devinfo   vqt_devinfo   GDOS   SpeedoGDOS   NVDI
 

7.6.74 Bindings for vq_devinfo

C: void vq_devinfo ( int16_t handle, int16_t device, int16_t *dev_open, int8_t *file_name, int8_t *device_name );
 
Binding:
 
void vq_devinfo (int16_t handle, int16_t device,
                 int16_t *dev_open, int8_t *file_name,
                 int8_t *device_name)
{
   intin[0] = device;

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

   vdi ();

   *dev_open = ptsout[0];
   dev_name[0..p]    = ptsout[1..p-1];
   file_name[0..i-1] = intout[0..i-1]
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 248 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] p # Entry in ptsout
contrl+6 contrl[3] 1 # Entry in intin
contrl+8 contrl[4] i # Entry in intout
contrl+12 contrl[6] handle
intin intin[0] device
intout intout[0..i-1] file_name[0..i-1]
ptsout ptsout[0] dev_open
ptsout+2 ptsout[1..p-1] device_name[0..p-2]

7.6.75 vq_extnd

Name: »Extended inquire function« - Obtain additional information about a workstation.
 
Opcode: 102
 
Syntax: void vq_extnd ( int16_t handle, int16_t owflag, int16_t *work_out );
 
Description: The call vq_extnd obtains additional information about the capabilities of a workstation. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
owflag Type of information:
0 = Return v_opnwk/v_opnvwk values
1 = Return additional information
work_out[0] Type of screen:
0 = No screen
1 = Separate alpha and graphic controllers and separate video memory
2 = Separate alpha and graphic controllers with shared video memory
3 = Common video and graphic controller with separate video memory
4 = Common alpha and graphic controller with shared video memory
(Note: All know devices return either 0 or 4)
work_out[1] Number of colour levels (refers to the CLUT)
work_out[2] Supported text effects (same bitmask as with vst_effects)
work_out[3] Raster scaling flag:
0 = Scaling impossible
1 = Scaling possible
work_out[4] Number of planes
work_out[5] CLUT flag (0 = no CLUT, 1 = CLUT or pseudo-CLUT (TrueColor) exists)
work_out[6] Performance factor (number of 16*16 raster operations per second)
work_out[7] Contour fill capability (v_contourfill)
0 = Not supported
1 = Contour fill supported
work_out[8] Text rotation ability:
0 = None
1 = In steps of 90 degrees only
2 = In steps of 1/10 degree
work_out[9] Number of writing modes available
work_out[10] Highest available input levels:
0 = None
1 = Request
2 = Request and sample
work_out[11] Text alignment capability flag:
0 = Not available
1 = Available
work_out[12] Inking capability flag:
0 = Device cannot ink
1 = Device can ink
work_out[13] Rubberbanding capability flag:
0 = No rubberbanding
1 = Capable of rubberband lines
2 = Capable of rubberband lines and rectangles
work_out[14] Maximum number of input vertices for v_pline, v_pmarker, v_fillarea, or -1 (unlimited)
work_out[15] Maximum number of intin arguments, or -1 (no limit)
work_out[16] Number of mouse buttons
work_out[17] Line types for wide lines:
0 = No
1 = Yes
work_out[18] Number of writing modes available for wide lines.
work_out[19] Clipping flag:
0 = Clipping off
1 = Clipping on

Only PC-GEM as of version 2.0 and NVDI.
work_out[20]
0 = No extended precision pixel size information is available
1 = Pixel size is in 1/10 microns
2 = Pixel size is in 1/100 microns
3 = Pixel size is in 1/1000 microns
work_out[21] Pixel width in 1/10, 1/100 or 1/1000 microns, like work_out[20]
work_out[22] Pixel height in 1/10, 1/100 or 1/1000 microns, like work_out[20]
work_out[23] Horizontal resolution in dpi
work_out[24] Vertical resolution in dpi
work_out[25] Flag to indicate whether bit-image files on printers can be rotated by the driver (as of PC-GEM/3):
0 = No
1 = Rotation in 0,90,180,270 degrees possible
work_out[26] +
work_out[27] Address of the screen buffer (1/4 of the screen area) that is used with AES functions (only as of PC-GEM/3)
work_out[28] Bezier flag:
Bit-1 = Driver has no Bezier capability (0), or driver has Bezier capability (1)

This information is available as of PC-GEM/3 as well as under NVDI
work_out[30] Raster flag:
Bit-0 = 1 vrt/vro_cpyfm is capable of scaling bitmaps
Bit-1 = 1 New raster function present, as of NVDI 5.00
Bit-2 = 1 New vr_clip_rects_xxx clipping function present, as of NVDI 5.02
work_out[32]
Bit-0 = 1 New style color routines (NVDI 5.xx)
work_out[40] Non-printable left margin in pixels (printers/plotters)
work_out[41] Non-printable top margin in pixels (printers/plotters)
work_out[42] Non-printable right margin in pixels (printers/plotters)
work_out[43] Non-printable bottom margin in pixels (printers/plotters)
work_out[44] Page size (printers etc.):
0 = Use default setting
1 = DIN A3
2 = DIN A4
3 = DIN A5
4 = DIN B5
16 = Letter Size
17 = Half Size
18 = Legal Size
19 = Double Size
20 = Broadsheet size
work_out[45] Top left X-coordinate, and
work_out[46] Top left Y-coordinate of the clipping rectangle
work_out[47] Bottom right X-coordinate, and
work_out[48] Bottom right Y-coordinate of the clipping rectangle
work_out[49]  
:  
:  
work_out[56] Reserved, contain zero

Notes: The stated assignments of the work_out arrays apply for the case that the extended information (owflag = 1) is to be obtained. If work_out[20] holds a non-zero value, work_out[21..24] and work_out[40..43] will contain extended information about pixel size and non-printable margins.
 
The non-printable margins are normally returned only by printer drivers. They permit an application to centre documents, or to provide the user with a true likeness of the printed page in which the marginal borders in the document are depicted. (The region returned by v_opnwk in work_out[0/1] is the printable area.)
 
If a driver returns more precise pixel sizes, this information should be used to calculate the position of graphic objects for printing. In worst case using the values from v_opnwk in work_out[3/4] can result in a positioning inaccuracy of 2 or 3 mm (for output on a DIN A4 page).
 
Atari originaly misdocumented the workout[5] (CLUT) element, reversing the values. The Falcon 030 and some third-party TrueColor boards return the correct values, but some older boards may not.
 
Return value: The function returns no direct function result.
 
Availability: Supported by all drivers.
 
Group: Inquire functions
 
See also: Binding   v_contourfill   vswr_mode   v_pline   v_pmarker   v_fillarea   v_opnwk
 

7.6.76 Bindings for vq_extnd

C: void vq_extnd ( int16_t handle, int16_t owflag, int16_t *work_out );
 
Binding:
 
void vq_extnd (int16_t handle, int16_t owflag,
               int16_t *work_out)
{
   intin[0] = owflag;

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

   vdi ();

   work_out[0..44]  = intout[0..44];
   work_out[45..56] = ptsout[0..11];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 102 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 6 # Entry in ptsout
contrl+6 contrl[3] 1 # Entry in intin
contrl+8 contrl[4] 45 # Entry in intout
contrl+12 contrl[6] handle
intin intin[0] owflag
intout intout[0..44] work_out[0..44]
ptsout ptsout[0..11] work_out[45..56]

7.6.77 vq_ext_devinfo

Name: »Inquire extended device status info« - Obtain information about a GDOS driver.
 
Opcode: 248 (Sub-Opcode 4242)
 
Syntax: int16_t vq_ext_devinfo ( int16_t handle, int16_t device, int16_t *dev_exists, int8_t *file_path, int8_t *file_name, int8_t *name );
 
Description: The call vq_ext_devinfo obtains extended information about a GDOS driver. The following apply:
 
Parameter Meaning
   
handle Workstation identifier
device Device ID (0..99)
dev_exists Driver:
0 = No driver
<>0 = Driver exists
file_path Pointer to the file path
file_name Pointer to the file name
name Pointer to the device name
Return value: The function returns the value 0 if the driver has not been opened yet, and <>0 if it is already open.
 
Availability: As of NVDI version 3.00
 
Group: Inquire functions
 
See also: Binding   vq_devinfo   vq_devinfo   GDOS   SpeedoGDOS   NVDI
 

7.6.78 Bindings for vq_ext_devinfo

C: int16_t vq_ext_devinfo ( int16_t handle, int16_t device, int16_t *dev_exists, int8_t *file_path, int8_t *file_name, int8_t *name );
 
Binding:
 
int16_t vq_ext_devinfo (int16_t handle, int16_t device,
                        int16_t *dev_exists,
                        int8_t *file_path,
                        int8_t *file_name, int8_t *name)
{
   intin[0] = device;
   intin[1..2] = file_path;
   intin[3..4] = file_name;
   intin[5..6] = name;

   contrl[0] = 248;
   contrl[1] = 0;
   contrl[3] = 7;
   contrl[5] = 4242;
   contrl[6] = handle;

   vdi ();

   *dev_exists = intout[0];
   return ( intout[1] );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 248 # Function Opcode
contrl+2 contrl[1] 0 # Entry in ptsin
contrl+4 contrl[2] 0 # Entry in ptsout
contrl+6 contrl[3] 7 # Entry in intin
contrl+8 contrl[4] 2 # Entry in intout
contrl+10 contrl[5] 4242 # Sub-opcode
contrl+12 contrl[6] handle
intin intin[0] device
intin+2 intin[1..2] file_path
intin+6 intin[3..4] file_name
intin+10 intin[5..6] name
intout intout[0] dev_exists
intout+2 intout[1] Return Value

7.6.79 vq_ptsinsz

Name:
 
Opcode: 238
 
Syntax: void vq_ptsinsz ( void );
 
Description: Some GDOS ask the driver how the size from his PTSIN array is.
 
Return value: Size of the PTSIN array.
 
Availability: Some GDOS
 
Group: Inquire functions
 
See also: Binding
 

7.6.80 Bindings for vq_ptsinsz

7.6.81 vq_scrninfo

Name: »Inquire screen information« - Return more exact specification about the screen format.
 
Opcode: 102 (Sub-Opcode 1, Opcode 2)
 
Syntax: void vq_scrninfo ( int16_t handle, int16_t *work_out );
 
Description: The call vq_scrninfo returns additional information about the device-specific screen format. This function is useful for programs which:
 
  • Build rasters (also in TrueColor) and want to copy them with vro_cpyfm to the screen
  • Save rasters (e.g. XIMGs)
  • Support genlock (overlay)
Return value: All information is passed to the outside with the work_out array:
 
work_out[0]: Workstation format:
0: Interleaved planes, word-wide (ATARI graphic)
1: Whole planes (standard format)
2: Packed pixels
-1: Unknown format
work_out[1]: Supported CLUT:
0: No CLUT (e.g. TTM 194)
1: Hardware CLUT
2: Software CLUT (HiColor or TrueColor)
work_out[2]: Number of planes (bits) per pixel
work_out[3]:  
work_out[4]: Number of colours, or 0L (more than 2*10^31 colours)
work_out[5]: Line width in bytes (as of EdDI 1.1)
work_out[6]: +
work_out[7]: Address of the bitmap (as of EdDI 1.1)
work_out[8]: Number of bits for red intensity
work_out[9]: Number of bits for green intensity
work_out[10]: Number of bits for blue intensity
work_out[11]: Number of bits for alpha channel
work_out[12]: Number of bits for genlock
work_out[13]: Number of unused bits
work_out[14]: Bit order (as of EdDI 1.1)
2-256 colours:
Bit-0 = Usual bit order

32768 colours (16 planes):
Bit-0 = Usual bit order: 1 bit overlay (or unused), 5 bits red, 5 bits green, 5 bits blue
(xrrrrrgg-gggbbbbb)
Bit-1 = Falcon bit order: 5 bits red, 5 bits green, 1 bit overlay, 5 bits blue
(rrrrrggg-ggxbbbbb)
Bit-7 = Swapped bytes (Intel order) e.g. Crazy Dots
(gggbbbbb-xrrrrrgg)

65536 colours (16 planes):
Bit-0 = Usual bit order: 5 bits red, 6 bits green, 5 bits blue
(rrrrrggg-gggbbbbb)
Bit-7 = Swapped bytes (Intel order) e.g. Crazy Dots 2
(gggbbbbb-rrrrrggg)

16.7 million colours (24 planes):
Bit-0 = Usual bit order: 8 bits red, 8 bits green, 8 bits blue
(rrrrrrrr-gggggggg-bbbbbbbb)
Bit-7 = Swapped bytes (Intel order)
(bbbbbbbb-gggggggg-rrrrrrrr)

16.7 million colours (32 planes):
Bit-0 = Usual bit order, 8 bits overlay or unused, 8 bits red, 8 bits green, 8 bits blue
(xxxxxxxx-rrrrrrrr-gggggggg-bbbbbbbb)
Bit-7 = Swapped bytes (Intel order)
(bbbbbbbb-gggggggg-rrrrrrrr-xxxxxxxx)

If a hardware CLUT (work_out[1] == 1) exists:
 
work_out[16..271]: Pixel value of the corresponding VDI colour index (0-255)

HiColor or TrueColor:
 
work_out[16..31]: Association of bit number in the pixel and bit of the red intensity
work_out[32..47]: Association of bit number in the pixel and bit of the green intensity
work_out[48..63]: Association of bit number in the pixel and bit of the blue intensity
work_out[64..79]: Association of bit number for alpha channel
work_out[80..95]: Association of bit numbers for genlock
work_out[96..127]: Bit numbers of unused bits
work_out[128..271]: Reserved (0)
Availability: As of EdDI-Version 1.00.
 
Group: Inquire functions
 
Note: Enhancer.prg as distributed with NVDI 2.5x, which simulates this call in case no NVDI is present, sometimes copies 273 values. It is therefore advisable to ensure that work_out has enough space for 273 values.
 
See also: Binding   Example   XIMG format   Raster formats   NVDI   Bitmap format for printer drivers
 

7.6.82 Bindings for vq_scrninfo

C: void vq_scrninfo ( int16_t handle, int16_t *work_out );
 
Binding:
 
void vq_scrninfo (int16_t handle, int16_t *work_out)
{
   intin[0] = 2;

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

   vdi ();

   work_out[0..272] = intout[0..272];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 102 # 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] 272 # Entry in intout
contrl+10 contrl[5] 1 # Sub-opcode
contrl+12 contrl[6] handle
intin intin[0] 2 # Opcode
intout intout[0..272] work_out[0..272]

7.6.83 Examples for vq_scrninfo

256 colors on the Falcon:

work_out Value Description
0 0 Interleaved planes, (words)
1 1 Hardware CLUT
2 8 8 bits per pixel
3/4 256 256 simultaneously displayable colors
5 xxxx Width of the bitmap in bytes (since EdDI 1.1)
6/7 xxxxL Address of the bitmap (since EdDI 1.1)
8 6 CLUT has 6 bits for red intensity
9 6 CLUT has 6 bits for green intensity
10 6 CLUT has 6 bits for blue intensity
11 0 No alpha channel
12 0 No genlock
13 0 No unused bits
14 1 Usual bit order (since EdDI 1.1)
     
16 0 Pixel value for VDI color index 0
17 255 Pixel value for VDI color index 1
18 2 Pixel value for VDI color index 2
... ...  
271 15 Pixel value for VDI color index 255

HiColor on the Falcon:

work_out Value Description
0 2 Packed pixels
1 2 HiColor (TrueColor:-) => pseudo CLUT
2 16 16 bits per pixel
3/4 32768 32768 colors
5 xxxx Width of the bitmap in bytes (since EdDI 1.1)
6/7 xxxxL Address of the bitmap (since EdDI 1.1)
8 5 5 bits for red intensity
9 5 5 bits for green intensity
10 5 5 bits for blue intensity
11 0 No alpha channel
12 1 1 bit for genlock (overlay)
13 0 No unused bits
14 2 Falcon bit order (rrrrrggg-ggxbbbbb ;since EdDI 1.1)
     
16 11 Bit 0 of the red intensity (least significant bit)
    Is bit 11 of the pixel
17 12 Bit 1 of the red intensity ist bit 12 of the pixel
18 13 ...
19 14 ...
20 15 Bit 4 of the red intensity (most significant bit)
    Is bit 15 of the pixel
21..31 -1 Bits are not used
     
     
32 6 Bit 0 of the green intensity (least significant bit)
Is bit 6 of the pixel
33 7 Bit 1 of the green intensity ist bit 7 of the pixel
34 8 ...
35 9 ...
36 10 Bit 4 of the green intensity (most significant bit)
    Is bit 10 of the pixel
37..37 -1 Bits are not used
     
     
48 0 Bit 0 of the blue intensity (least significant bit)
Is bit 0 of the pixel
49 1 Bit 1 of the blue intensity is bit 1 of the pixel
50 2 ...
51 3 ...
52 4 Bit 4 of the blue intensity (most significant bit)
    Is bit 4 of the pixel
53..63 -1 Bits are not used
     
     
64..79 -1 No alpha channel
     
     
80 5 Bit for genlock/overlay
81..95 -1 Not used
     
     
96..127 -1 No unused bits

HiColor on a VGA graphic card (e.g. Crazy Dots):

work_out Value Description
0 2 Packed pixels
1 2 HiColor => pseudo CLUT
2 16 16 bits per pixel
3/4 32768 32768 colors
5 xxxx Width of the bitmap in bytes (since EdDI 1.1)
6/7 xxxxL Address of the bitmap (since EdDI 1.1)
8 5 5 bits for red intensity
9 5 5 bits for green intensity
10 5 5 bits for blue intensity
11 0 No alpha channel
12 1 No genlock/overlay
13 0 1 unused bits
14 129 Swapped bit order (gggbbbbb-xrrrrrgg; since EdDI 1.1)
     
16 2 Bit 0 of the red intensity (least significant bit)
    Is bit 2 of the pixel
17 3 Bit 1 of the red intensity is bit 3 of the pixel
18 4 ...
19 5 ...
20 6 Bit 4 of the red intensity (most significant bit)
    Is bit 6 of the pixel
21..31 -1 Bits are not used
     
     
32 13 Bit 0 of the green intensity (least significant bit)
    Is bit 13 of the pixel
33 14 Bit 1 of the green intensity is bit 14 of the pixel
34 15 ...
35 0 ...
36 1 Bit 4 of the green intensity (most significant bit)
    Is bit 1 of the pixel
37..37 -1 Bits are not used
     
     
48 8 Bit 0 of the blue intensity (least significant bit)
    Is bit 8 of the pixel
49 9 Bit 1 of the blue intensity is bit 9 of the pixel
50 10 ...
51 11 ...
52 12 Bit 4 of the green intensity (most significant bit)
    Is bit 12 of the pixel
53..63 -1 Bits are not used
     
     
64..79 -1 No alpha channel
     
     
80..95 -1 No genlock/overlay
     
     
96 7 Bit 7 is an unused bit
97..127 -1 No further unused bits

Note: The output in work_out[5..7/14] only exist as of EdDI 1.1. Check the cookie version before you use them.

See also: vq_scrninfo   Raster formats   NVDI

7.6.84 v_create_driver_info

Name: Inquire info about a driver.
 
Opcode: 180
 
Syntax: DRV_INFO *v_create_driver_info( int16_t handle, int16_t driver_id );
 
Description: The call v_create_driver_info returns information about device drivers.
 
Parameter Meaning
   
handle Workstation identifier
device_id Number of the device driver
Return value: The function returns a pointer to a DRV_INFO structure, or 0L.
 
Availability: NVDI 5
 
Group: Inquire functions
 
See also: Binding
 

7.6.85 Bindings for v_create_driver_info

C: DRV_INFO *v_create_driver_info( int16_t handle, int16_t driver_id );
 
Binding:
 
DRV_INFO *v_create_driver_info( int16_t handle,
                                int16_t driver_id )
{
  int16_t save_conf;

  intin[0] = driver_id;

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

  contrl[2] = 0;
  contrl[4] = 0;

  save_conf = disable_nvdi_errors();
  vdi ();
  enable_nvdi_errors( save_conf );

  if ( contrl[4] >= 2 )
    return(*(DRV_INFO **) &intout[0] );

  return( 0L );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 180 # 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] 2 # Entry in intout
contrl+10 contrl[5] 0
contrl+12 contrl[6] handle
intin intin[0] driver_id
intout intout[0..1] Return-Wert

7.6.86 v_delete_driver_info

Name: Discard information about a driver.
 
Opcode: 181
 
Syntax: int16_t v_delete_driver_info( int16_t handle, DRV_INFO *drv_info );
 
Description: The call v_delete_driver_info discards the information obtained with v_create_driver_info.
 
Parameter Meaning
   
handle Workstation identifier
drv_info Pointer to the structure of v_create_driver_info
Return value: Unknown.
 
Availability: NVDI 5
 
Group: Inquire functions
 
See also: Binding   v_create_driver_info
 

7.6.87 Bindings for v_delete_driver_info

C: int16_t v_delete_driver_info( int16_t handle, DRV_INFO *drv_info );
 
Binding:
 
int16_t v_delete_driver_info( int16_t handle,
                              DRV_INFO *drv_info )
{
  *(DRV_INFO **) &intin[0] = drv_info;

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

  vdi ();

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

Address Element Contents
contrl contrl[0] 181 # 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+10 contrl[5] 0
contrl+12 contrl[6] handle
intin intin[0..1] drv_info

7.6.88 v_getbitmap_info

Name: »Get character bitmap information« - Obtain placement information about the bitmap of a vector character.
 
Opcode: 239
 
Syntax: void v_getbitmap_info ( int16_t handle, int16_t ch, fix31 *advx, fix31 *advy, fix31 *xoff, fix31 *yoff, int16_t *width, int16_t *height, int16_t **bitmap );
 
Description: The call v_getbitmap_info returns a pointer to the character's bitmap and provides information about the character placement, size and alignment.
 
Parameter Meaning
   
handle Workstation identifier
ch Character to return info about
advx X-advance in 1/65536 pixels
advy Y-advance in 1/65536 pixels
xoff X-offset in 1/65536 pixels
yoff Y-offset in 1/65536 pixels
width Bitmap width in pixels
height Bitmap height in pixels
bitmap Pointer to the bitmap

Notes: advx/y represent the offset vectors for the correct placement of the next character. x/yoff are offset vectors of the top left corner of the bitmap relative to the position of the character cell, and are necessary because most bitmaps are smaller than the character cell containing them.
 
To get reproducible output even without NVDI, any text effects should be switched off. As the pointer to the bitmap points to the character cache as a rule, one should copy the bitmap directly after the call (tip: inhibit AES context switching with wind_update!) - otherwise the pointer could be invalid already.
 
Additionally one should not call v_getbitmap_info for very large characters (e.g. 300 pts or more), as these, depending on the cache size, may not be capable of being built up completely; in this case the bitmap contains only a part of the character.
 
You should not use this function to write your own text output function - this function would not be faster than v_ftext and you would not be able to do pair kerning. Use v_ftext!
 
Return value: The function does not return a result.
 
Availability: As of SpeedoGDOS 4.00 and as of NVDI 3.00. (The call also existed in FSMGDOS but with a completely different calling format; Atari changed it, as no FSMGDOS program utilized it at the time.)
 
Group: Inquire functions
 
See also: Binding   vst_effects   SpeedoGDOS   NVDI
 

7.6.89 Bindings for v_getbitmap_info

C: void v_getbitmap_info ( int16_t handle, int16_t ch, fix31 *advx, fix31 *advy, fix31 *xoff, fix31 *yoff, int16_t *width, int16_t *height, int16_t **bitmap );
 
Binding:
 
void v_getbitmap_info (int16_t handle, int16_t ch,
                       fix31 *advx, fix31 *advy,
                       fix31 *xoff, fix31 *yoff,
                       int16_t *width, int16_t *height,
                       int16_t **bitmap)
{
   intin[0] = ch;

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

   vdi ();

   *width  = intout[0];
   *height = intout[1];
   *advx   = intout[2..3];
   *advy   = intout[4..5];
   *xoff   = intout[6..7];
   *yoff   = intout[8..9];
   *bitmap = intout[10..11];
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 239 # 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] 12 # Entry in intout
contrl+12 contrl[6] handle
intin intin[0] ch
intout intout[0] width
intout+2 intout[1] height
intout+4 intout[2..3] advx
intout+8 intout[4..5] advy
intout+12 intout[6..7] xoff
intout+16 intout[8..9] yoff
intout+20 intout[10..11] bitmap

7.6.90 v_get_driver_info

Name: »Inquire extended device status info« - Obtain further information about a device driver.
 
Opcode: -1 (Sub-Opcode 4)
 
Syntax: void v_get_driver_info ( int16_t device_id, int16_t info_select, int8_t *info_string );
 
Description: The call v_get_driver_info returns extended information about a device driver and its fonts.
 
Parameter Meaning
   
device_id Number of the device driver
info_select Depending on value of info_select one gets certain information in info_string:
info_select info_string
   
1 Filename of the driver
2 Designation of the device
3 Add-on information, if present
4 Font files of the device
5 Patch address of the driver (e.g. printer port number)
Return value: The function does not return a result.
 
Availability: GEM/3
 
Group: Inquire functions
 
See also: Binding
 

7.6.91 Bindings for v_get_driver_info

C: void v_get_driver_info ( int16_t device_id, int16_t info_select, int8_t *info_string );
 
Binding:
 
void v_get_driver_info ( int16_t device_id,
                         int16_t info_select,
                         int8_t *info_string )
{
   intin[0] = device_id;
   intin[1] = info_select;

   contrl[0] = -1;
   contrl[1] = 0;
   contrl[3] = 2;
   contrl[5] = 4;
   contrl[6] = 0;

   vdi ();

   if ( info_select != 5 )
   {
      bptr = (int8_t *) intout ;
      for ( ii = 0; ii < contrl[ 4 ]; ii ++ )
         *info_string++ = *bptr++ ;
      *info_string = 0 ;
   }
   else
      *(int16_t *)info_string = intout[ 0 ] ;
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] -1 # 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] n # Entry in intout
contrl+10 contrl[5] 4 # Sub-opcode
contrl+12 contrl[6] 0
intin intin[0] device_id
intin+2 intin[1] info_select
intout intout[0..n-1] info_string

7.6.92 v_read_default_settings

Name: »Read default settings« - Obtain the default printer settings.
 
Opcode: 182 (Subfunction 0)
 
Syntax: int16_t v_read_default_settings( int16_t handle, PRN_SETTINGS *settings );
 
Description: The call v_read_default_settings obtains the default settings of the installed printer.
 
Parameter Meaning
   
handle Workstation identifier
settings Pointer to a structure of type PRN_SETTINGS
Return value: Returns 0 if there an error.
 
Availability: NVDI 5
 
Group: Inquire functions
 
See also: Binding   v_write_default_settings
 

7.6.93 Bindings for v_read_default_settings

C: int16_t v_read_default_settings( int16_t handle, PRN_SETTINGS *settings );
 
Binding:
 
int16_t v_read_default_settings( int16_t handle,
                                 PRN_SETTINGS *settings )
{
  int16_t save_conf;

  *(PRN_SETTINGS **) &intin[0] = settings;

  contrl[0] = 182;
  contrl[1] = 0;
  contrl[3] = 2;
  contrl[5] = 0;                 /* Subfunction 0 */
  contrl[6] = handle;

  contrl[2] = 0;
  contrl[4] = 0;

  save_conf = disable_nvdi_errors();
  vdi ();
  enable_nvdi_errors( save_conf );

  if ( contrl[4] >= 1 )
    return( intout[0] );

  return( 0 );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 182 # 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+10 contrl[5] 0 # Sub-opcode
contrl+12 contrl[6] handle
intin intin[0..1] settings

7.6.94 v_write_default_settings

Name: »Write default settings« - Set the default printer settings.
 
Opcode: 182 (Subfunction 1)
 
Syntax: int16_t v_write_default_settings( int16_t handle, PRN_SETTINGS *settings );
 
Description: The function v_write_default_settings sets the default printer settings for the installed printer.
 
Parameter Meaning
   
handle Workstation identifier
settings Pointer to a structure of type PRN_SETTINGS
Return value: Returns 0 if there an error.
 
Availability: NVDI 5
 
Group: Inquire functions
 
See also: Binding   v_read_default_settings
 

7.6.95 Bindings for v_write_default_settings

C: int16_t v_write_default_settings( int16_t handle, PRN_SETTINGS *settings );
 
Binding:
 
int16_t v_write_default_settings( int16_t handle,
                                  PRN_SETTINGS *settings )
{
  int16_t save_conf;

  *(PRN_SETTINGS **) &intin[0] = settings;

  contrl[0] = 182;
  contrl[1] = 0;
  contrl[3] = 2;
  contrl[5] = 1;                  /* Subfucntion 1 */
  contrl[6] = handle;

  contrl[2] = 0;
  contrl[4] = 0;

  save_conf = disable_nvdi_errors();
  vdi ();
  enable_nvdi_errors( save_conf );

  if ( contrl[4] >= 1 )
    return( intout[0] );

  return( 0 );
}
GEM-Arrays:
 

Address Element Contents
contrl contrl[0] 182 # 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+10 contrl[5] 1 # Sub-opcode
contrl+12 contrl[6] handle
intin intin[0..1] settings

7.6.96 Make-up of the font-header

The font header returned by vqt_fontheader is built up as follows:

FH_FMVER    0      /* U   "D4.0" CR LF NULL NULL  8 bytes             */
FH_FNTSZ    8      /* U   Font size (bytes) 4 bytes                   */
FH_FBFSZ   12      /* U   Min. font buffer size (bytes) 4 bytes       */
FH_CBFSZ   16      /* U   Min. char. buffer size (bytes) 2 bytes      */
FH_HEDSZ   18      /* U   Header size (bytes) 2 bytes                 */
FH_FNTID   20      /* U   Source font ID  2 bytes                     */
FH_SFVNR   22      /* U   Source font version number  2 bytes         */
FH_FNTNM   24      /* U   Source font full name  70 bytes             */
FH_MDATE   94      /* U   Manufacturing date  10 bytes                */
FH_LAYNM  104      /* U   Layout (character set) name  70 bytes       */
FH_CPYRT  174      /* U   Copyright notice  78 bytes                  */
FH_NCHRL  252      /* U   No. of char. indices in layout  2 bytes     */
FH_NCHRF  254      /* U   Total character indices in font  2 bytes    */
FH_FCHRF  256      /* U   Index of first char. in font  2 bytes       */
FH_NKTKS  258      /* U   Number of kerning tracks in font 2 bytes    */
FH_NKPRS  260      /* U   Number of kerning pairs in font 2 bytes     */
FH_FLAGS  262      /* U   Font flags  1 byte:                         */
                   /*       Bit 0: Extended mode if set,              */
                                   Compact mode (default) if clear    */
                   /*       Bit 1: Not used                           */
                   /*       Bit 2: Not used                           */
                   /*       Bit 3: Not used                           */
                   /*       Bit 4: Not used                           */
                   /*       Bit 5: Not used                           */
                   /*       Bit 6: Not used                           */
                   /*       Bit 7: Not used                           */

FH_CLFGS  263      /* U   Classification flags  1 byte:               */
                   /*       Bit 0: Italic                             */
                   /*       Bit 1: Monospace                          */
                   /*       Bit 2: Serif                              */
                   /*       Bit 3: Display                            */
                   /*       Bit 4: Reserved                           */
                   /*       Bit 5: Reserved                           */
                   /*       Bit 6: Reserved                           */
                   /*       Bit 7: Reserved                           */

FH_FAMCL  264      /* U   Family classification  1 byte:              */
                   /*       0:  Don't care                            */
                   /*       1:  Serif                                 */
                   /*       2:  Sans serif                            */
                   /*       3:  Monospace                             */
                   /*       4:  Script or calligraphic                */
                   /*       5:  Decorative                            */
                   /*       6-255: Not used                           */

FH_FRMCL  265      /* U   Font form classification  1 byte:           */
                   /*       Bits 0-3 (Width type):                    */
                   /*         0-3:   Reserved                         */
                   /*         4:     Condensed                        */
                   /*         5:     Reserved for 3/4 condensed       */
                   /*         6:     Semi-condensed                   */
                   /*         7:     Reserved for 1/4 condensed       */
                   /*         8:     Normal                           */
                   /*         9:     Reserved for 3/4 expanded        */
                   /*        10:     Semi-expanded                    */
                   /*        11:     Reserved for 1/4 expanded        */
                   /*        12:     Expanded                         */
                   /*        13-15:  Reserved                         */
                   /*       Bits 4-7 (Weight):                        */
                   /*         0:   Reserved                           */
                   /*         1:   Thin                               */
                   /*         2:   Ultralight                         */
                   /*         3:   Extralight                         */
                   /*         4:   Light                              */
                   /*         5:   Book                               */
                   /*         6:   Normal                             */
                   /*         7:   Medium                             */
                   /*         8:   Semibold                           */
                   /*         9:   Demibold                           */
                   /*         10:  Bold                               */
                   /*         11:  Extrabold                          */
                   /*         12:  Ultrabold                          */
                   /*         13:  Heavy                              */
                   /*         14:  Black                              */
                   /*         15-16: Reserved                         */

FH_SFNTN  266      /* U   Short font name  32 bytes                   */
FH_SFACN  298      /* U   Short face (family) name  16 bytes          */
FH_FNTFM  314      /* U   Font form (as above)  14 bytes              */
FH_ITANG  328      /* U   Italic angle (1/256 deg clockw)  2 bytes    */
FH_ORUPM  330      /* U   Number of ORUs per em  2 bytes              */
FH_WDWTH  332      /* U   Width of word-space (ASCII 32)  2 bytes     */
FH_EMWTH  334      /* U   Width of em-space  2 bytes                  */
FH_ENWTH  336      /* U   Width of en-space  2 bytes                  */
FH_TNWTH  338      /* U   Width of thin-space  2 bytes                */
FH_FGWTH  340      /* U   Width of figure-space  2 bytes              */
FH_FXMIN  342      /* U   Font-wide min. X coord.  2 bytes            */
FH_FYMIN  344      /* U   Font-wide min. Y coord.  2 bytes            */
FH_FXMAX  346      /* U   Font-wide max. X coord.  2 bytes            */
FH_FYMAX  348      /* U   Font-wide max. Y coord.  2 bytes            */
FH_ULPOS  350      /* U   Underline position  2 bytes                 */
FH_ULTHK  352      /* U   Underline thickness  2 bytes                */
FH_SMCTR  354      /* U   Small capitals transformation  6 bytes      */
FH_DPSTR  360      /* U   Display superiors transformation  6 bytes   */
FH_FNSTR  366      /* U   Footnote superiors transformation  6 bytes  */
FH_ALSTR  372      /* U   Alpha superiors transformation  6 bytes     */
FH_CMITR  378      /* U   Chemical inferiors transformation  6 bytes  */
FH_SNMTR  384      /* U   Small numerators transformation  6 bytes    */
FH_SDNTR  390      /* U   Small denominators transformation  6 bytes  */
FH_MNMTR  396      /* U   Medium numerators transformation  6 bytes   */
FH_MDNTR  402      /* U   Medium denominators transformation  6 bytes */
FH_LNMTR  408      /* U   Large numerators transformation  6 bytes    */
FH_LDNTR  414      /* U   Large denominators transformation  6 bytes  */
                   /*     Transformation data format:                 */
                   /*       Y position  2 bytes                       */
                   /*       X scale (1/4096ths)  2 bytes              */
                   /*       Y scale (1/4096ths)  2 bytes              */

SIZE_FW FH_LDNTR + 6   /* Size of nominal font header                 */
EXP_FH_METRES SIZE_FW  /* Offset to expansion field metric
                          resolution (optional)                       */

See also: vqt_fontheader   Header for bitmap GDOS fonts   Vector fonts

7.6.97 disable_nvdi_errors

int16_t disable_nvdi_errors ( void )
{
  int16_t save_conf;
  NVDI_STRUC *p;

  if ( get_cookie( 'NVDI', p ) )
  {
    save_conf = p->nvdi_config;
    p->nvdi_config |= 2;
    p->nvdi_config &= 0xFFBF;

    return save_conf;
  }

  return 0;
}

7.6.98 enable_nvdi_errors

void enable_nvdi_errors ( int16_t save_conf )
{
  NVDI_STRUC *p;

  if ( get_cookie( 'NVDI', p ) )
    p->nvdi_config = save_conf;

  return;
}

Home VDIVDI Output functionsOutput functions Input functionsInput functions