GEMLIB  0.44.0
Macros | Functions
VDI extended functions

Macros

#define vst_kern_info   vst_track_offset
 

Functions

void v_clsbm (short handle)
 
void v_opnbm (short *work_in, MFDB *bitmap, short *handle, short *work_out)
 
void vq_scrninfo (short handle, short *work_out)
 
short v_bez_on (short handle)
 
void v_bez_off (short handle)
 
void v_bez (short handle, short count, short *xyarr, char *bezarr, short *extent, short *totpts, short *totmoves)
 
void v_bez_fill (short handle, short count, short *xyarr, char *bezarr, short *extent, short *totpts, short *totmoves)
 
void v_bez_qual (short handle, short percent, short *actual)
 
void v_ftext (VdiHdl, short x, short y, const char *str)
 
void v_ftext16 (VdiHdl, short x, short y, const WCHAR *wstr)
 
void v_ftext16n (VdiHdl, PXY pos, const WCHAR *wstr, short num)
 
void v_ftext_offset (VdiHdl, short x, short y, const char *str, const short *offset)
 
void v_ftext_offset16 (VdiHdl, short x, short y, const WCHAR *wstr, const short *offset)
 
void v_ftext_offset16n (VdiHdl, short x, short y, const WCHAR *wstr, short num, const short *offset)
 
void v_getbitmap_info (VdiHdl, short ch, long *advancex, long *advancey, long *xoffset, long *yoffset, short *width, short *height, short **bitmap)
 
void v_getoutline (VdiHdl, short ch, short *xyarray, char *bezarray, short maxverts, short *numverts)
 
short vq_devinfo (VdiHdl, short device, short *dev_exists, char *file_name, char *device_name)
 
void vqt_devinfo (VdiHdl, short device, short *dev_busy, char *file_name, char *device_name)
 
short vq_ext_devinfo (VdiHdl, short device, short *dev_exists, char *file_path, char *file_name, char *name)
 
void vqt_advance (VdiHdl, short ch, short *advx, short *advy, short *xrem, short *yrem)
 
void vqt_advance32 (VdiHdl, short ch, long *advx, long *advy)
 
short vqt_ext_name (VdiHdl, short __index, char *name, short *font_format, short *flags)
 
void vqt_f_extent (VdiHdl, const char *str, short extent[])
 
void vqt_f_extent16 (VdiHdl, const WCHAR *str, short extent[])
 
void vqt_f_extent16n (VdiHdl, const WCHAR *str, short num, short extent[])
 
void vqt_fontheader (VdiHdl, char *buffer, char *pathname)
 
short vqt_name_and_id (VdiHdl, short font_format, char *font_name, char *ret_name)
 
void vqt_pairkern (VdiHdl, short ch1, short ch2, long *x, long *y)
 
void vqt_real_extent (VdiHdl, short x, short y, char *string, short extent[])
 
void vqt_real_extent16n (VdiHdl, short x, short y, const WCHAR *wstring, short num, short extent[])
 
void vqt_trackkern (VdiHdl, long *x, long *y)
 
short vqt_xfntinfo (VdiHdl, short flags, short id, short __index, XFNT_INFO *info)
 
short vst_arbpt (VdiHdl, short point, short *wchar, short *hchar, short *wcell, short *hcell)
 
long vst_arbpt32 (VdiHdl, long point, short *wchar, short *hchar, short *wcell, short *hcell)
 
void vst_charmap (VdiHdl, short mode)
 
void vst_kern (VdiHdl, short tmode, short pmode, short *tracks, short *pairs)
 
short vst_name (VdiHdl, short font_format, char *font_name, char *ret_name)
 
short vst_setsize (VdiHdl, short point, short *wchar, short *hchar, short *wcell, short *hcell)
 
long vst_setsize32 (VdiHdl, long point, short *wchar, short *hchar, short *wcell, short *hcell)
 
short vst_skew (VdiHdl, short skew)
 
void vst_track_offset (VdiHdl, long offset, short pairmode, short *tracks, short *pairs)
 
void vst_width (VdiHdl, short width, short *char_width, short *char_height, short *cell_width, short *cell_height)
 
short vqt_char_index (short handle, short scr_index, short scr_mode, short dst_mode)
 
short vst_map_mode (short handle, short mode)
 
DRV_INFOv_create_driver_info (short handle, short driver_id)
 
short v_delete_driver_info (short handle, DRV_INFO *drv_info)
 
short v_read_default_settings (short handle, PRN_SETTINGS *settings)
 
short v_write_default_settings (short handle, PRN_SETTINGS *settings)
 
long v_color2nearest (short handle, long color_space, COLOR_ENTRY *color, COLOR_ENTRY *nearest_color)
 
unsigned long v_color2value (short handle, long color_space, COLOR_ENTRY *color)
 
COLOR_TABv_create_ctab (short handle, long color_space, unsigned long px_format)
 
ITAB_REF v_create_itab (short handle, COLOR_TAB *ctab, short bits)
 
unsigned long v_ctab_idx2value (short handle, short __index)
 
short v_ctab_idx2vdi (short handle, short __index)
 
short v_ctab_vdi2idx (short handle, short vdi_index)
 
short v_delete_ctab (short handle, COLOR_TAB *ctab)
 
short v_delete_itab (short handle, ITAB_REF itab)
 
long v_get_ctab_id (short handle)
 
short v_get_outline (short handle, short __index, short x_offset, short y_offset, short *pts, char *flags, short max_pts)
 
short v_opnprn (short aes_handle, PRN_SETTINGS *settings, short work_out[])
 
short v_open_bm (short base_handle, GCBITMAP *bitmap, short color_flags, short unit_flags, short pixel_width, short pixel_height)
 
short v_resize_bm (short handle, short width, short height, long b_width, unsigned char *addr)
 
void v_setrgb (short handle, short type, short r, short g, short b)
 
long v_value2color (short handle, unsigned long value, COLOR_ENTRY *color)
 
short vq_ctab (short handle, long ctab_length, COLOR_TAB *ctab)
 
long vq_ctab_entry (short handle, short __index, COLOR_ENTRY *color)
 
long vq_ctab_id (short handle)
 
short vq_dflt_ctab (short handle, long ctab_length, COLOR_TAB *ctab)
 
long vq_hilite_color (short handle, COLOR_ENTRY *hilite_color)
 
short vq_margins (short handle, short *top_margin, short *bottom_margin, short *left_margin, short *right_margin, short *hdpi, short *vdpi)
 
long vq_max_color (short handle, COLOR_ENTRY *hilite_color)
 
long vq_min_color (short handle, COLOR_ENTRY *hilite_color)
 
long vq_prn_scaling (short handle)
 
long vq_px_format (short handle, unsigned long *px_format)
 
long vq_weight_color (short handle, COLOR_ENTRY *hilite_color)
 
long vqf_bg_color (short handle, COLOR_ENTRY *fg_color)
 
long vqf_fg_color (short handle, COLOR_ENTRY *fg_color)
 
long vql_bg_color (short handle, COLOR_ENTRY *fg_color)
 
long vql_fg_color (short handle, COLOR_ENTRY *fg_color)
 
long vqm_bg_color (short handle, COLOR_ENTRY *fg_color)
 
long vqm_fg_color (short handle, COLOR_ENTRY *fg_color)
 
long vqr_bg_color (short handle, COLOR_ENTRY *fg_color)
 
long vqr_fg_color (short handle, COLOR_ENTRY *fg_color)
 
long vqt_bg_color (short handle, COLOR_ENTRY *fg_color)
 
long vqt_fg_color (short handle, COLOR_ENTRY *fg_color)
 
void vr_transfer_bits (short handle, GCBITMAP *src_bm, GCBITMAP *dst_bm, short *src_rect, short *dst_rect, short mode)
 
short vs_ctab (short handle, COLOR_TAB *ctab)
 
short vs_ctab_entry (short handle, short __index, long color_space, COLOR_ENTRY *color)
 
short vs_dflt_ctab (short handle)
 
short vs_document_info (short vdi_handle, short type, char *s, short wchar)
 
short vs_hilite_color (short handle, long color_space, COLOR_ENTRY *hilite_color)
 
short vs_max_color (short handle, long color_space, COLOR_ENTRY *min_color)
 
short vs_min_color (short handle, long color_space, COLOR_ENTRY *min_color)
 
short vs_weight_color (short handle, long color_space, COLOR_ENTRY *weight_color)
 
short vsf_bg_color (short handle, long color_space, COLOR_ENTRY *bg_color)
 
short vsf_fg_color (short handle, long color_space, COLOR_ENTRY *fg_color)
 
short vsl_bg_color (short handle, long color_space, COLOR_ENTRY *bg_color)
 
short vsl_fg_color (short handle, long color_space, COLOR_ENTRY *fg_color)
 
short vsm_bg_color (short handle, long color_space, COLOR_ENTRY *bg_color)
 
short vsm_fg_color (short handle, long color_space, COLOR_ENTRY *fg_color)
 
short vsr_bg_color (short handle, long color_space, COLOR_ENTRY *bg_color)
 
short vsr_fg_color (short handle, long color_space, COLOR_ENTRY *fg_color)
 
short vst_bg_color (short handle, long color_space, COLOR_ENTRY *bg_color)
 
short vst_fg_color (short handle, long color_space, COLOR_ENTRY *fg_color)
 

Detailed Description

Macro Definition Documentation

#define vst_kern_info   vst_track_offset

another name for vst_track_offset

Function Documentation

void v_bez ( short  handle,
short  count,
short *  xyarr,
char *  bezarr,
short *  extent,
short *  totpts,
short *  totmoves 
)

This function draws an unfilled bezier curve.

Parameters
handleDevice handle
count
xyarrxyarr[0..2count-1] = coordinates
bezarrbezarr[0..count-1] = point-type flags defined as follow:
  • bit 0: first point in a 4-point bezier curve (two anchor points and two direction points). The last point of a bezier segment can be the first point of the next bezier curve (or it can be a jump point).
  • bit 1: jump point - this point and the previous one will not be connected.
  • Bit 2-7 are reserved. If bit 0 is 0, v_bez() works like v_pline() and draws a straight line between two points.
extentcoordinates of the bounding box
totptsnumber of points in the resulting polygon
totmovesnumber of moves in the polygon
Since
since NVDI 2.10

References VDI_CNTRLMAX, VDI_INTINMAX, and VDI_PTSINMAX.

void v_bez_fill ( short  handle,
short  count,
short *  xyarr,
char *  bezarr,
short *  extent,
short *  totpts,
short *  totmoves 
)

This call draws a filled polygon with bezier curves.

Parameters
handleDevice handle
count
xyarrxyarr[0..2count-1] = coordinates
bezarrbezarr[0..count-1] = point-type flags defined as follow:
  • bit 0: first point in a 4-point bezier curve (two anchor points and two direction points). The last point of a bezier segment can be the first point of the next bezier curve (or it can be a jump point).
  • bit 1: jump point - this point and the previous one will not be connected.
  • Bit 2-7 are reserved. If bit 0 is 0, v_bez() works like v_pline() and draws a straight line between two points.
extentcoordinates of the bounding box
totptsnumber of points in the resulting polygon
totmovesnumber of moves in the polygon
Since
since NVDI 2.10

References VDI_CNTRLMAX, VDI_INTINMAX, and VDI_PTSINMAX.

void v_bez_off ( short  handle)

This function exists only for compatibility reasons. It switches off the special treatment of v_bez()/v_bez_fill().

Parameters
handleDevice handle
Since
since NVDI 2.10

References VDI_CNTRLMAX.

short v_bez_on ( short  handle)

After calling v_bez_on(), you can call v_bez()/v_bez_fill() without a sub-opcode in contrl[5]. This function exists only for compatibility reasons and usually it is only used in old GEM/3 metafiles.

Parameters
handleDevice handle
Returns
bezier depth, is a value between 0 (no beziers) and 7 (maximum quality) and represents the bezier depth. You should only use this value to determine if the driver is able to draw bezier curves.
Since
NVDI 2.10

Applications should only use this call to determine, if the driver is able to draw bezier curves (check if the return value indicates bezier support).

References VDI_CNTRLMAX.

void v_bez_qual ( short  handle,
short  percent,
short *  actual 
)

specifies the quality and accuracy of the bezier curves. You can select the quality in a range between 0 and 100 per cent.

Parameters
handleDevice handle
percentrequested bezier quality
actualrealized bezier quality
Since
since NVDI 2.10

References VDI_CNTRLMAX.

void v_clsbm ( short  handle)

closes an offscreen bitmap. If the VDI has allocated the memory for the bitmap, this call frees the memory.

Parameters
handleDevice handle
Since
since EdDI 1.00

References VDI_CNTRLMAX.

long v_color2nearest ( short  handle,
long  color_space,
COLOR_ENTRY color,
COLOR_ENTRY nearest_color 
)
Parameters
handleDevice handle
color_space
color
nearest_color
[option CHECK_NULLPTR] nearest_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

unsigned long v_color2value ( short  handle,
long  color_space,
COLOR_ENTRY color 
)
Parameters
handleDevice handle
color_space
color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

COLOR_TAB* v_create_ctab ( short  handle,
long  color_space,
unsigned long  px_format 
)
Parameters
handleDevice handle
color_space
px_format
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

DRV_INFO* v_create_driver_info ( short  handle,
short  driver_id 
)
Parameters
handleDevice handle
driver_iddevice id (0-99)
Returns
A pointer to a DRV_INFO structur or 0L
Since
NVDI 5.00

References VDI_CNTRLMAX.

ITAB_REF v_create_itab ( short  handle,
COLOR_TAB ctab,
short  bits 
)
Parameters
handleDevice handle
ctab
bits
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

unsigned long v_ctab_idx2value ( short  handle,
short  index 
)
Parameters
handleDevice handle
index
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short v_ctab_idx2vdi ( short  handle,
short  index 
)
Parameters
handleDevice handle
index
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short v_ctab_vdi2idx ( short  handle,
short  vdi_index 
)
Parameters
handleDevice handle
vdi_index
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short v_delete_ctab ( short  handle,
COLOR_TAB ctab 
)
Parameters
handleDevice handle
ctab
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short v_delete_driver_info ( short  handle,
DRV_INFO drv_info 
)
Parameters
handleDevice handle
drv_infoPointer from v_create_driver_info
Returns
Since
NVDI 5.00

References VDI_CNTRLMAX.

short v_delete_itab ( short  handle,
ITAB_REF  itab 
)
Parameters
handleDevice handle
itab
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

void v_ftext ( short  handle,
short  x,
short  y,
const char *  str 
)

This text function uses track and pair kerning and works with an internal resolution of 1/65536 pixels to maintain accurate character placement.

Parameters
handleDevice handle
x
y
str
Since
NVDI 3.00
Note
There is another variant of v_ftext() which allows your application to specifiy the offset of each character relative to the previous one: v_ftext_offset()

References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().

void v_ftext16 ( short  handle,
short  x,
short  y,
const WCHAR wstr 
)

see v_ftext()

Parameters
handleDevice handle
x
y
wstrstring (16 bits per character)

References VDI_CNTRLMAX, and vdi_wstrlen().

void v_ftext16n ( short  handle,
PXY  pos,
const WCHAR wstr,
short  num 
)

see v_ftext()

Parameters
handleDevice handle
pos
wstrstring (16 bits per character)
numstring len

References VDI_CNTRLMAX.

void v_ftext_offset ( short  handle,
short  x,
short  y,
const char *  str,
const short *  offset 
)

This text function uses track and pair kerning and works with an internal resolution of 1/65536 pixels to maintain accurate character placement. This variant of v_ftext() which allows your application to specifiy the offset of each character relative to the previous one

Parameters
handleDevice handle
x
y
str
offset
  • offset[0] : x-offset of the first character
  • offset[1] : y-offset of the first character
  • offset[2..(2*n)-1] : x-offset, y-offset of the next characters
Since
NVDI 3.00

References VDI_CNTRLMAX, VDI_PTSINMAX, and vdi_str2array_n().

void v_ftext_offset16 ( short  handle,
short  x,
short  y,
const WCHAR wstr,
const short *  offset 
)

see v_ftext_offset()

Parameters
handleDevice handle
x
y
wstr
offset

References VDI_CNTRLMAX, VDI_PTSINMAX, and vdi_wstrlen().

void v_ftext_offset16n ( short  handle,
short  x,
short  y,
const WCHAR wstr,
short  num,
const short *  offset 
)

see v_ftext_offset()

Parameters
handleDevice handle
x
y
wstr
numstring len
offset

References VDI_CNTRLMAX, and VDI_PTSINMAX.

long v_get_ctab_id ( short  handle)
Parameters
handleDevice handle
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short v_get_outline ( short  handle,
short  index,
short  x_offset,
short  y_offset,
short *  pts,
char *  flags,
short  max_pts 
)
Parameters
handleDevice handle
index
x_offset
y_offset
pts
flags
max_pts
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

void v_getbitmap_info ( short  handle,
short  ch,
long *  advancex,
long *  advancey,
long *  xoffset,
long *  yoffset,
short *  width,
short *  height,
short **  bitmap 
)

This function returns a pointer to a character's bitmap and provides information about the character placement and its size.

Parameters
handleDevice handle
chZeichen-Index
advancexx advance in 1/65536 pixels
[option CHECK_NULLPTR] advancex may be NULL
advanceyy advance in 1/65536 pixels
The advance vector represents the offset for the placement of the next character.
[option CHECK_NULLPTR] advancey may be NULL
xoffsetx offset in 1/65536 pixels
[option CHECK_NULLPTR] xoffset may be NULL
yoffsety offset in 1/65536 pixels
x_offset and y_offset are the offset of the bitmap relative to the position of the character cell. This offset is necessary because most bitmaps are smaller than the character cell.
[option CHECK_NULLPTR] yoffset may be NULL
widthbitmap width in pixels
[option CHECK_NULLPTR] width may be NULL
heightbitmap height in pixels
[option CHECK_NULLPTR] height may be NULL
bitmappointer to the bitmap
[option CHECK_NULLPTR] bitmap may be NULL
Since
NVDI 3.00
Note
You should switch off text effects before you call v_getbitmap_info().

In general the pointer to the bitmap points into the character cache and therefore you should immediately copy the bitmap (and lock the aes context switch by calling wind_update()) - otherwise the pointer could be invalid.

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()!

References VDI_CNTRLMAX.

void v_getoutline ( short  handle,
short  ch,
short *  xyarray,
char *  bezarray,
short  maxverts,
short *  numverts 
)

This function generates a bezier curve of the specified character, which can be used to call v_bez() or v_bez_fill().

Parameters
handleDevice handle
chcharacter index
xyarraycoordinate buffer
bezarraypoint-type buffer (jump, bez)
maxvertsmaximum number of points
numvertsnumber of points
Since
NVDI 3.00
Note
If you want to use the outline returned by v_getoutline() as vector graphic (e.g. as part of a Metafile), you should select a sufficient character height. Otherwise the quality of the outline will be very poor, because v_getoutline() has to round the internal fixed-point coordinates and returns only integer values. The character height should refer to the resolution of the font outline (returned by vqt_fontheader() in FH_ORUPM, e.g. 2048).

References VDI_CNTRLMAX.

short v_open_bm ( short  base_handle,
GCBITMAP bitmap,
short  color_flags,
short  unit_flags,
short  pixel_width,
short  pixel_height 
)
Parameters
base_handleDevice handle
bitmap
color_flags
unit_flags
pixel_width
pixel_height
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

void v_opnbm ( short *  work_in,
MFDB bitmap,
short *  handle,
short *  work_out 
)

This function creates an offscreen bitmap on which can draw with VDI functions. You can pass a pointer to a bitmap or otherwise the VDI will allocate the memory for it. The pixel sizes will be used to scale vector fonts, so that the aspect ratio and the proportions will be correct.

Parameters
work_in
  • work_in[0..10]: see v_opnwk()/v_opnvwk()
  • work_in[11]: width -1 (e.g. 1279)
  • work_in[12]: height -1 (e.g. 959)
  • work_in[13]: pixel width in microns
  • work_in[14]: pixel height in microns
  • work_in[15..19]: must be 0 (!!) if you want to create a bitmap in device specific format
If the EdDI cookie has version number 1.1 or newer, v_opnbm() takes additional arguments in work_in[15..19] into account:
  • work_in[15..16]: number of simultaneously displayable colors
  • work_in[17]: number of planes
  • work_in[18]: pixel format
  • work_in[19]: bit order
For a more detailed description of the pixel format and bit order see vq_scrninfo().
bitmappointer to the MFDB of the bitmap.
If bitmap->fd_addr is zero, the VDI will allocate memory for the bitmap according to the width an height in work_on (and the bitmap will be erased).
To create a bitmap in device specific format, bitmap->fd_nplanes has to be zero or the number of planes of the screen (returned by vq_extnd() in work_out[4]). If bitmap->fd_nplanes is 1, the VDI creates a monochrome bitmap.
The structure members of the MFDB (fd_addr, fd_w, fd_h, fd_wdwidth, fd_stand, fd_nplanes) will be initialized by the VDI driver and returned to the calling application. If there is not enough memory for the bitmap, the MFDB will not be changed and a zero-handle will be returned.
If bitmap->fd_addr is a nonzero value, the VDI will use it as a pointer to a bitmap and if the bitmap is in standard format, it will be transformed to the device specific format.
If v_opnbm() does not support the requested format of the bitmap (that means the number of colors, planes and the organisation), a zero-handle will indicate an error.
handleDevice handle
work_out
Since
since EdDI 1.00

If your redraw (of a window region) is very complex or time consuming and causes a flickering on the screen, you should use an offscreen bitmap to create an image and then you should copy it to the screen via vrt_cpyfm() or vro_cpyfm().

References VDI_CNTRLMAX.

short v_opnprn ( short  aes_handle,
PRN_SETTINGS settings,
short  work_out[] 
)
Parameters
aes_handleDevice handle
settings
work_out
Returns
Since
NVDI 5 ?

References _prn_settings::device, _prn_settings::driver_id, _prn_settings::size_id, and VDI_CNTRLMAX.

short v_read_default_settings ( short  handle,
PRN_SETTINGS settings 
)
Parameters
handleDevice handle
settingsPointer to a structur of the Typ PRN_SETTINGS
Returns
0 for an error
Since
NVDI 5.00

References VDI_CNTRLMAX.

short v_resize_bm ( short  handle,
short  width,
short  height,
long  byte_width,
unsigned char *  addr 
)
Parameters
handleDevice handle
width
height
byte_width
addr
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

void v_setrgb ( short  handle,
short  type,
short  r,
short  g,
short  b 
)
Parameters
handleDevice handle
type
r
g
b
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long v_value2color ( short  handle,
unsigned long  value,
COLOR_ENTRY color 
)
Parameters
handleDevice handle
value
color
[option CHECK_NULLPTR] color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short v_write_default_settings ( short  handle,
PRN_SETTINGS settings 
)
Parameters
handleDevice handle
settingsPointer to a structur of the Typ PRN_SETTINGS
Returns
0 for an error
Since
NVDI 5.00

References VDI_CNTRLMAX.

short vq_ctab ( short  handle,
long  ctab_length,
COLOR_TAB ctab 
)
Parameters
handleDevice handle
ctab_length
ctab
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vq_ctab_entry ( short  handle,
short  index,
COLOR_ENTRY color 
)
Parameters
handleDevice handle
index
color
[option CHECK_NULLPTR] color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vq_ctab_id ( short  handle)
Parameters
handleDevice handle
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vq_devinfo ( short  handle,
short  device,
short *  dev_exists,
char *  file_name,
char *  device_name 
)

reports back, if a driver exists and if he has been opened. Besides the name of the driver (e.g. "XVGA256.SYS") and the 'readable' name ("VGA 256 colors") are returned.

Parameters
handleany Device handle. handle must be a valid VDI handle. The workstation opened by the AES (see mt_graf_handle() ) seems to be a good choice. Some VDI layer crashes is you set handle a nul value.
devicedevice id (0-99)
dev_exists
  • 0: driver doesn't exist for this device.
  • 1: driver exists for this device
file_namefile name
device_namereadable device name
Returns
0 if the driver is not opened, or can be opened once more. It's similar to the dev_busy parameter of vqt_devinfo().
Since
NVDI 3.00, SpeedoGDOS 4
See also
vqt_devinfo()
Note
FontGDOS 2 may crash this binding (vdi_control values returned are doesn't deals with the data returned in vdi_intout/ptsout).
If the file name is empty, there is no driver with the given id device.

References VDI_CNTRLMAX, VDI_INTOUTMAX, and VDI_PTSOUTMAX.

Referenced by vqt_devinfo().

short vq_dflt_ctab ( short  handle,
long  ctab_length,
COLOR_TAB ctab 
)
Parameters
handleDevice handle
ctab_length
ctab
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vq_ext_devinfo ( short  handle,
short  device,
short *  dev_exists,
char *  file_path,
char *  file_name,
char *  name 
)

Similar to vq_devinfo() the function vq_ext_devinfo() returns information about the driver.

Parameters
handleDevice handle
devicedevice id (0-99)
dev_exists
  • 0: no driver
  • != 0: driver exists
file_pathpointer to the file path
file_namepointer to the file name
namepointer to the device name
Returns
device opened:
  • 0: driver is closed
  • != 0: driver is already open
Since
NVDI 3.00

References VDI_CNTRLMAX.

long vq_hilite_color ( short  handle,
COLOR_ENTRY hilite_color 
)
Parameters
handleDevice handle
hilite_color
[option CHECK_NULLPTR] hilite_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX, and VDI_INTOUTMAX.

short vq_margins ( short  handle,
short *  top_margin,
short *  bottom_margin,
short *  left_margin,
short *  right_margin,
short *  hdpi,
short *  vdpi 
)
Parameters
handleDevice handle
top_margin
bottom_margin
left_margin
right_margin
hdpi
vdpi
Returns
0 if this function is not supported by the driver, any other value if the driver support this function.
Since
depend of the driver

References VDI_CNTRLMAX.

long vq_max_color ( short  handle,
COLOR_ENTRY hilite_color 
)
Parameters
handleDevice handle
hilite_color
[option CHECK_NULLPTR] hilite_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vq_min_color ( short  handle,
COLOR_ENTRY hilite_color 
)
Parameters
handleDevice handle
hilite_color
[option CHECK_NULLPTR] hilite_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vq_prn_scaling ( short  handle)
Parameters
handleDevice handle
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vq_px_format ( short  handle,
unsigned long *  px_format 
)
Parameters
handleDevice handle
px_format
[option CHECK_NULLPTR] px_format may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

void vq_scrninfo ( short  handle,
short *  work_out 
)

returns extended information about the bitmap format of the device (the device-specific format).

Parameters
handleDevice handle
work_out
  • work_out[0]: pixel format
    • 0: interleaved planes, organized in words (ATARI)
    • 1: standard format (whole planes)
    • 2: packed pixels
    • (-1): unknown format; not accessible
  • work_out[1]: CLUT flag
    • 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/4]: number of colors or 0L (more than 2*10^31 colors)
  • work_out[5]: line width in bytes (since EdDI 1.1)
  • work_out[6/7]: address of the bitmap (since EdDI 1.1)
  • work_out[8]: number of bits for red levels
  • work_out[9]: number of bits for green levels
  • work_out[10]: number of bits for blue levels
  • 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 (since EdDI 1.1)
    • 2-256 colors:
                     bit number| description
                     ----------|--------------------------------------------------
                        0      | usual bit order
      
    • 32768 colors (16 planes):
                     bit number| description
                     ----------|--------------------------------------------------
                        0      | usual bit order: 1 bit overlay (or unused),
                               | 5 bits red, 5 bits green, 5 bits blue
                               | (xrrrrrgg-gggbbbbb)
                               |
                        1      | Falcon bit order: 5 bits red, 5 bits green,
                               | 1 bit overlay, 5 bits blue
                               | (rrrrrggg-ggxbbbbb)
                               |
                        7      | swapped bytes (intel order)
                               | e.g. Crazy Dots (gggbbbbb-xrrrrrgg)
      
    • 65536 colors (16 planes):
                     bit number| description
                     ----------|--------------------------------------------------
                        0      | usual bit order: 5 bits red, 6 bits green, 
                               | 5 bits blue (rrrrrggg-gggbbbbb)
                               |
                        7      | swapped bytes (intel order)
                               | e.g. Crazy Dots 2 (gggbbbbb-rrrrrggg)
      
    • 16777216 colors (24 planes):
                     bit number| description
                     ----------|--------------------------------------------------
                        0      | usual bit order: 8 bits red, 8 bits green,
                               | 8 bits blue (rrrrrrrr-gggggggg-bbbbbbbb)
                               |
                        7      | swapped bytes (intel order)
                               | (bbbbbbbb-gggggggg-rrrrrrrr)
      
    • 16777216 colors (32 Planes):
                     bit number| description
                     ----------|--------------------------------------------------
                        0      | usual bit order, 8 bits overlay or unused, 
                               | 8 bits red, 8 bits green, 8 bits blue
                               | (xxxxxxxx-rrrrrrrr-gggggggg-bbbbbbbb)
                               |
                        7      | swapped bytes (intel order)
                               | (bbbbbbbb-gggggggg-rrrrrrrr-xxxxxxxx)
      
If a hardware CLUT (intout[1] == 1) exists:
  • work_out[16-271]: pixel value of the corresponding VDI color index (0-255)
In case of HiColor, TrueColor...:
  • work_out[16..31]: bit number of the pixel associated with the bit number of the intensity level of red
  • work_out[32..47]: bit number of the pixel associated with the bit number of the intensity level of green
  • work_out[48..63]: bit number of the pixel associated with the bit number of the intensity level of blue
  • work_out[64..79]: bit numbers for alpha channel
  • work_out[80..95]: bit numbers for genlock
  • work_out[96..127]: unused bits
  • work_out[128..271]: reserved (0)
Since
since EdDI 1.00
    Examples:
   ----------

   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 | Wert   | Meaning
   ---------|--------|-----------------------------------------------------
      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 since EdDI 1.1. Check the cookie 
version before you use them.

References VDI_CNTRLMAX.

long vq_weight_color ( short  handle,
COLOR_ENTRY hilite_color 
)
Parameters
handleDevice handle
hilite_color
[option CHECK_NULLPTR] hilite_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vqf_bg_color ( short  handle,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
bg_color
[option CHECK_NULLPTR] bg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vqf_fg_color ( short  handle,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
fg_color
[option CHECK_NULLPTR] fg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vql_bg_color ( short  handle,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
bg_color
[option CHECK_NULLPTR] bg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vql_fg_color ( short  handle,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
fg_color
[option CHECK_NULLPTR] fg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vqm_bg_color ( short  handle,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
bg_color
[option CHECK_NULLPTR] bg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vqm_fg_color ( short  handle,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
fg_color
[option CHECK_NULLPTR] fg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vqr_bg_color ( short  handle,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
bg_color
[option CHECK_NULLPTR] bg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

long vqr_fg_color ( short  handle,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
fg_color
[option CHECK_NULLPTR] fg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

void vqt_advance ( short  handle,
short  ch,
short *  advx,
short *  advy,
short *  xrem,
short *  yrem 
)

This call returns the advance vector of a character which can be used to place the next one (the advance width is not the width of the character bitmap!).

Parameters
handleDevice handle
chcharacter index
advxx advance in pixels
[option CHECK_NULLPTR] advx may be NULL
advyy advance in pixels
[option CHECK_NULLPTR] advy may be NULL
xremx remainder (mod 16384)
[option CHECK_NULLPTR] xrem may be NULL
yremy remainder (mod 16384)
[option CHECK_NULLPTR] yrem may be NULL
Since
NVDI 3.00
Note
The values advx .. yrem are returned for compatibility's sake only. Do not use them! You should use x_advance and y_advance from vqt_advance32().

References VDI_CNTRLMAX.

void vqt_advance32 ( short  handle,
short  ch,
long *  advx,
long *  advy 
)

This call returns the advance vector of a character which can be used to place the next one (the advance width is not the width of the character bitmap!).

Parameters
handleDevice handle
chcharacter index
advxx advance in 1/65536 pixels
[option CHECK_NULLPTR] advx may be NULL
advyy advance in 1/65536 Pixels
[option CHECK_NULLPTR] advy may be NULL
Since
NVDI 3.00
Note
Remember that advx and advy are only offsets used to place the next character - they do not include parts of the character which extend beyond the em square.

References VDI_CNTRLMAX.

long vqt_bg_color ( short  handle,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
bg_color
[option CHECK_NULLPTR] bg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vqt_char_index ( short  handle,
short  scr_index,
short  scr_mode,
short  dst_mode 
)

converts src_index according to the encodings src_mode and dst_mode. If it is not possible to convert an index, dst_index will be 0xffff.

Parameters
handleDevice handle
scr_index
scr_modeMapping of src_index
  • 0: src_index is a direct index
  • 1: src_index is an ASCII index
  • 2: src_index is a unicode index
dst_modeMapping of dst_index
  • 0: dst_index is a direct index
  • 1: dst_index is an ASCII index
  • 2: dst_index is a unicode index
Returns
dst_index
Since
NVDI 4.00
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:

WORD  is_char_available( WORD handle, UWORD unicode )
{
   UWORD direct_index;
   
   // translate <unicode> into a direct index 
   direct_index = vqt_char_index( handle, unicode, 2, 0 );
   
   if ( direct_index == 0xffff )
      return( 0 );                     // character is available
   else
      return( 1 );                     // not available
}

References VDI_CNTRLMAX.

void vqt_devinfo ( short  handle,
short  device,
short *  dev_busy,
char *  file_name,
char *  device_name 
)

reports back, if a driver exists and if he has been opened. Besides the name of the driver (e.g. "XVGA256.SYS") and the 'readable' name ("VGA 256 colors") are returned.

Parameters
handleany Device handle. handle must be a valid VDI handle. The workstation opened by the AES (see mt_graf_handle() ) seems to be a good choice. Some VDI layer crashes is you set handle a nul value.
devicedevice id (0-99)
dev_busy
  • 0: driver is closed or can be opened once more
  • 1: driver is already open and cannot be opened once more ATM.
file_namefile name
device_namereadable device name
Since
NVDI 3.00, SpeedoGDOS 4
See also
vq_devinfo()
Note
FontGDOS 2 may crash this binding (vdi_control values returned are doesn't deals with the data returned in vdi_intout/ptsout).
If the file name is empty, there is no driver with the given id device.

References vq_devinfo().

short vqt_ext_name ( short  handle,
short  index,
char *  name,
short *  font_format,
short *  flags 
)

is an extended version of vqt_name()

Parameters
handleDevice handle
indexindex (1 - number of fonts)
name
  • name[0..31] : font name
  • name[32] : 0: bitmap font, 1: vector font
font_format
  • 1: bitmap font
  • 2: Speedo font
  • 4: TrueType font
  • 8: Type 1 font
flags
  • 0: proportional font
  • 1: monospaced font
Returns
font id or 0 on failure
Since
NVDI 3.00

References vdi_array2str(), and VDI_CNTRLMAX.

void vqt_f_extent ( short  handle,
const char *  str,
short  extent[] 
)

As well as vqt_extent() this function adds the character widths of a string, but this function takes track and pair kerning into account and works with a resolution of 1/65536 pixels. Text effects like skewing (vst_skew()) and characters which are extending beyond the em square are ignored.

Parameters
handleDevice handle
strZeichenkette
extentextent[0..7] : coordinates of the rectangle
Since
NVDI 3.00
Note
If the text is rotated by 90, 180 or 270 degrees, this function works as senseless as vqt_extent(): It changes the reference point of the coordinate system. In all other cases it works as you would expect it.
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 to the leftmost and rightmost coordinates of the rectangle (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().

References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().

void vqt_f_extent16 ( short  handle,
const WCHAR wstr,
short  extent[] 
)

see vqt_f_extent()

Parameters
handleDevice handle
wstr
extent
Since
NVDI 3.00

References VDI_CNTRLMAX, and vdi_wstrlen().

void vqt_f_extent16n ( short  handle,
const WCHAR wstr,
short  num,
short  extent[] 
)

see vqt_f_extent()

Parameters
handleDevice handle
wstr
numstring len
extent
Since
NVDI 3.00

References VDI_CNTRLMAX.

long vqt_fg_color ( short  handle,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
fg_color
[option CHECK_NULLPTR] fg_color may be NULL
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

void vqt_fontheader ( short  handle,
char *  buffer,
char *  pathname 
)

copies the header of a speedo font file into buffer and returns a pointer to the TDF file. The buffer should have a size of 1 Kb, because the header size depends on the font and extensions of the font format.

Parameters
handleDevice handle
bufferfont header
pathnamename of the TDF
Since
NVDI 3.00

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.

Note:

Usually the following elements of the font header are the most interesting ones for programmers:

Name      Offset  Length  Description
FH_FNTNM    24     70     font name (siehe auch vqt_name()),
                          e.g. "Century 725 Italic BT"
FH_NKTKS   258      2     number of kerning tracks
FH_NKPRS   260      2     number of kerining pairs, (see vst_kern())
FH_CLFGS   263      1     classification (Italic and Monospace)
FH_SFNTN   266     32     name of the corresponding Postscript font,
                          e.g. "Century725BT-Italic"
FH_SFACN   298     16     short name of the family, e.g. "Century725 BT"
FH_FNTFM   314     14     style, e.g. "Italic"
FH_ITANG   328      2     skew in 1/256 of degrees (if it is an italic font),
                          e.g 4480 (17,5 degree)
FH_ORUPM   330      2     number of ORUs per em, e.g. 2048

References vdi_array2str(), VDI_CNTRLMAX, and VDI_INTOUTMAX.

short vqt_name_and_id ( short  handle,
short  font_format,
char *  font_name,
char *  ret_name 
)

This function searches the font specified by font_name and font_format. Missing or extra spaces in the font name are ignored. If the font cannot be found, return value is zero.

Parameters
handleDevice handle
font_formatpossible font formats
  • 1: bitmap font
  • 2: Speedo font
  • 4: TrueType font
  • 8: Type 1 font
font_namefont name
ret_namefont name
Returns
font id or 0 on failure
Since
NVDI 3.02

References vdi_array2str(), VDI_CNTRLMAX, VDI_INTINMAX, VDI_INTOUTMAX, and vdi_str2array_n().

void vqt_pairkern ( short  handle,
short  ch1,
short  ch2,
long *  x,
long *  y 
)

This function returns the adjustment vector for pair kerning

Parameters
handleDevice handle
ch1first character
ch2following character
xx-adjustment in 1/65536 pixels
[option CHECK_NULLPTR] x may be NULL
yy-adjustment in 1/65536 pixels
[option CHECK_NULLPTR] y may be NULL
Since
NVDI 3.00

References VDI_CNTRLMAX.

void vqt_real_extent ( short  handle,
short  x,
short  y,
char *  string,
short  extent[] 
)

This function is only available if you use NVDI. It returns the bounding box (eventually a quadrilateral, not a rectangle) for text output at x, y. This function considers all text effects, rotation, skewing, pair kerning, track kerning, characters which are extending beyond the em square, horizontal and vertical alignment.

Parameters
handleDevice handle
xx-coordinate
yy-coordinate
stringstring
extentcoordinates of the bounding box
Since
NVDI 3.00

References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().

void vqt_real_extent16n ( short  handle,
short  x,
short  y,
const WCHAR wstring,
short  num,
short  extent[] 
)

see vqt_real_extent

Parameters
handleDevice handle
xx-coordinate
yy-coordinate
wstringstring in 16 bits format
numstring len
extentcoordinates of the bounding box
Since
NVDI 3.00

References VDI_CNTRLMAX.

void vqt_trackkern ( short  handle,
long *  x,
long *  y 
)

This function returns the adjustment vector per character for track kerning

Parameters
handleDevice handle
xx-adjustment in 1/65536 pixels
[option CHECK_NULLPTR] x may be NULL
yy-adjustment in 1/65536 pixels
[option CHECK_NULLPTR] y may be NULL
Since
NVDI 3.00

References VDI_CNTRLMAX.

short vqt_xfntinfo ( short  handle,
short  flags,
short  id,
short  index,
XFNT_INFO info 
)

This function returns extended font information specified by flags in a XFNT_INFO structure. If the index is a nonzero value vqt_xfntinfo() searches the correspoding font and returns the requested information. If index is zero, vqt_xfntinfo() searches the font specified by id. If index and id are zero, this function returns information about the current font.

Parameters
handleDevice handle
flagskind of requested information (bit number):
  • 0: return the full font name (font_name)
  • 1: return the name of the family (family_name)
  • 2: return the style name (style_name)
  • 3: return the file name (file_name1)
  • 4: return the 2. optional file name (file_name2)
  • 5: return the 3. optional file name (file_name3)
  • 8: return the available pt sizes (without enlargment) (pt_cnt, pt_sizes)
  • 9: return the available pt sizes (with enlargment) (pt_cnt, pt_sizes)
idfont id or 0 (current font)
indexfont index or 0 (use id)
infopointer to the XFNT_INFO structure
Returns
font id or 0 on failure
Since
NVDI 3.02

References XFNT_INFO::format, XFNT_INFO::id, XFNT_INFO::index, XFNT_INFO::size, and VDI_CNTRLMAX.

void vr_transfer_bits ( short  handle,
GCBITMAP src_bm,
GCBITMAP dst_bm,
short *  src_rect,
short *  dst_rect,
short  mode 
)
Parameters
handleDevice handle
src_bm
dst_bm
src_rect
dst_rect
mode
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vs_ctab ( short  handle,
COLOR_TAB ctab 
)
Parameters
handleDevice handle
ctab
Returns
Since
NVDI 5 ?

References COLOR_TAB::length, and VDI_CNTRLMAX.

short vs_ctab_entry ( short  handle,
short  index,
long  color_space,
COLOR_ENTRY color 
)
Parameters
handleDevice handle
index
color_space
color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vs_dflt_ctab ( short  handle)
Parameters
handleDevice handle
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vs_document_info ( short  handle,
short  type,
char *  s,
short  wchar 
)
Parameters
handleDevice handle
type
s
wchar
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().

short vs_hilite_color ( short  handle,
long  color_space,
COLOR_ENTRY hilite_color 
)
Parameters
handleDevice handle
color_space
hilite_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vs_max_color ( short  handle,
long  color_space,
COLOR_ENTRY min_color 
)
Parameters
handleDevice handle
color_space
min_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vs_min_color ( short  handle,
long  color_space,
COLOR_ENTRY min_color 
)
Parameters
handleDevice handle
color_space
min_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vs_weight_color ( short  handle,
long  color_space,
COLOR_ENTRY weight_color 
)
Parameters
handleDevice handle
color_space
weight_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vsf_bg_color ( short  handle,
long  color_space,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
color_space
bg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vsf_fg_color ( short  handle,
long  color_space,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
color_space
fg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vsl_bg_color ( short  handle,
long  color_space,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
color_space
bg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vsl_fg_color ( short  handle,
long  color_space,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
color_space
fg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vsm_bg_color ( short  handle,
long  color_space,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
color_space
bg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vsm_fg_color ( short  handle,
long  color_space,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
color_space
fg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vsr_bg_color ( short  handle,
long  color_space,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
color_space
bg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vsr_fg_color ( short  handle,
long  color_space,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
color_space
fg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

short vst_arbpt ( short  handle,
short  point,
short *  wchar,
short *  hchar,
short *  wcell,
short *  hcell 
)
Parameters
handleDevice handle
point
wchar
[option CHECK_NULLPTR] wchar may be NULL
hchar
[option CHECK_NULLPTR] hchar may be NULL
wcell
[option CHECK_NULLPTR] wcell may be NULL
hcell
[option CHECK_NULLPTR] hcell may be NULL
Returns
Since

References VDI_CNTRLMAX.

long vst_arbpt32 ( short  handle,
long  point,
short *  wchar,
short *  hchar,
short *  wcell,
short *  hcell 
)

Similar to vst_point() this function sets the character height in points, but you are able to change the size in steps of 1/65536 points. If you request a negative height, the characters are mirrored along the x-axis.

Parameters
handleDevice handle
pointrequested height in 1/65536 pts
wcharselected character width
[option CHECK_NULLPTR] wchar may be NULL
hcharselected character height
[option CHECK_NULLPTR] hchar may be NULL
wcellselected character cell width
[option CHECK_NULLPTR] wcell may be NULL
hcellselected character cell height
[option CHECK_NULLPTR] hcell may be NULL
Returns
selected height in 1/65536 pts
Since
NVDI 3.00
Note
The returned character widths are rounded values which cannot be used for precise character placement.

References VDI_CNTRLMAX.

short vst_bg_color ( short  handle,
long  color_space,
COLOR_ENTRY bg_color 
)
Parameters
handleDevice handle
color_space
bg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

void vst_charmap ( short  handle,
short  mode 
)

switches from ASCII-mapping to direct mapping, which means that you can access all characters of a font (e.g. if the user wants to select a special non-ASCII character), but an index like 65 does not stand for 'A' anymore but for another character. If you switch to direct mapping, the number of characters per font (minADE and maxADE/vqt_fontinfo()) is changed to the number of really existing characters.

Parameters
handleDevice handle
modemapping mode
  • 0: direct mapping
  • 1: ASCII mapping
Since
NVDI 3.00
Note
If you want to switch on ASCII-mapping, you should use 1 as mode and not any other nonzero value, because other mapping might exist in future (e.g. Unicode).
Since NVDI 4 is able to use Unicode for mapping characters, there is an extended Binding to select Unicode (see vst_map_mode()).

References VDI_CNTRLMAX.

short vst_fg_color ( short  handle,
long  color_space,
COLOR_ENTRY fg_color 
)
Parameters
handleDevice handle
color_space
fg_color
Returns
Since
NVDI 5 ?

References VDI_CNTRLMAX.

void vst_kern ( short  handle,
short  tmode,
short  pmode,
short *  tracks,
short *  pairs 
)

This function can be used to set the track and pair kerning mode. Most Speedo fonts have 3 kerning tracks. Ordinary TrueType fonts do not have any kerning tracks, but some GX TrueTypes do.

Parameters
handleDevice handle
tmoderequested track kerning mode
  • 0: no track kerning
  • 1: normal
  • 2: tight
  • 3: very tight
pmodepair kerning on (1) or off (0)
  • 0: no pair kerning
  • 1: do pair kerning
trackstrack kerning mode
[option CHECK_NULLPTR] tracks may be NULL
pairsnumber of kerning pairs
[option CHECK_NULLPTR] pairs may be NULL
Since
NVDI 3.00
Note
NVDI allows the caller to set a user-defined track kerning. see vst_track_offset()

References VDI_CNTRLMAX.

short vst_map_mode ( short  handle,
short  mode 
)

vst_charmap()-like function which is able to use Unicode for mapping characters.

Parameters
handleDevice handle
modemapping mode
  • 0: direct mapping
  • 1: ASCII mapping
  • 2: Unicode mapping
Returns
set mapping mode, or -1.
Since
NVDI 4

If you select Unicode and if you want to determine whether a certain character exists, you should call vqt_width(). If the index returned by vqt_width() is -1, the character does not exist. Instead of vqt_width() you can also call vqt_char_index() and map the Unicode index into a direct index.

Note
this function returns -1 if the VDI doesn't support this call, or if the VDI doesn't return anything (NVDI3?).

References VDI_CNTRLMAX.

short vst_name ( short  handle,
short  font_format,
char *  font_name,
char *  ret_name 
)

This function selects the font specified by font_name and font_format. Missing or extra spaces in the font name are ignored. If the requested font is not available, the system font is selected.

Parameters
handleDevice handle
font_formatpossible font formats
  • 1: bitmap font
  • 2: Speedo font
  • 4: TrueType font
  • 8: Type 1 font
font_namefont name
ret_namename of the selected font
[option CHECK_NULLPTR] ret_name may be NULL
Returns
selected font id or 0 on failure
Since
NVDI 3.02

References vdi_array2str(), VDI_CNTRLMAX, VDI_INTINMAX, VDI_INTOUTMAX, and vdi_str2array_n().

short vst_setsize ( short  handle,
short  point,
short *  wchar,
short *  hchar,
short *  wcell,
short *  hcell 
)
Parameters
handleDevice handle
point
wchar
[option CHECK_NULLPTR] wchar may be NULL
hchar
[option CHECK_NULLPTR] hchar may be NULL
wcell
[option CHECK_NULLPTR] wcell may be NULL
hcell
[option CHECK_NULLPTR] hcell may be NULL
Returns
Since

References VDI_CNTRLMAX.

long vst_setsize32 ( short  handle,
long  point,
short *  wchar,
short *  hchar,
short *  wcell,
short *  hcell 
)

sets the character width in 1/65536 points (pt). The next call of vst_height(), vst_point() or vst_arbpt32() will reset the character width. If the width is negative the characters will be mirrored along the y-axis.

Parameters
handleDevice handle
pointrelative width in 1/65536 points
wcharselected character width
[option CHECK_NULLPTR] wchar may be NULL
hcharselected character height
[option CHECK_NULLPTR] hchar may be NULL
wcellselected character cell width
[option CHECK_NULLPTR] wcell may be NULL
hcellselected character cell height
[option CHECK_NULLPTR] hcell may be NULL
Returns
selected width in 1/65536 points
Since
NVDI 3.00

References VDI_CNTRLMAX.

short vst_skew ( short  handle,
short  skew 
)

This function sets the skew of vector font characters in steps of 1/10 degrees. The skewing angle is independent from vst_effects() and must be in a range between -90 and +90 degrees. Positive angles will lean the characters to the left whereas negative angles will lean them to the right.

Parameters
handleDevice handle
skewangle in 1/10 degrees
Returns
selected angle in 1/10 degrees
Since
NVDI 3.00

References VDI_CNTRLMAX.

void vst_track_offset ( short  handle,
long  offset,
short  pairmode,
short *  tracks,
short *  pairs 
)

allows the caller to set a user-defined track kerning

Parameters
handleDevice handle
offsetoffset in 1/65536 pixels.
pairmodepair kerning on (1) or off (0)
trackstrack kerning mode
[option CHECK_NULLPTR] tracks may be NULL
pairsnumber of kerning pairs
[option CHECK_NULLPTR] pairs may be NULL
Since
NVDI 3.00

References VDI_CNTRLMAX.

void vst_width ( short  handle,
short  width,
short *  char_width,
short *  char_height,
short *  cell_width,
short *  cell_height 
)

This function sets the character width in pixels. The next call of vst_height(), vst_point() or vst_arbpt32() resets the width.

Parameters
handleDevice handle
widthrequested width
char_widthselected character width
[option CHECK_NULLPTR] char_width may be NULL
char_heightselected character height
[option CHECK_NULLPTR] char_height may be NULL
cell_widthselected character cell width
[option CHECK_NULLPTR] cell_width may be NULL
cell_heightselected character cell height
[option CHECK_NULLPTR] cell_height may be NULL
Since
NVDI 3.00
Note
You should use vst_setsize32() instead of vst_width() because vst_width() uses only an integer value as relative width and it therefore does not offer the necessary accuracy.

References VDI_CNTRLMAX.