GEMLIB
0.44.0
|
inquiry functions More...
Functions | |
void | vq_cellarray (VdiHdl, short pxy[], short row_len, short nrows, short *el_used, short *rows_used, short *status, short color[]) |
short | vq_color (VdiHdl, short color_idx, short flag, short rgb[]) |
void | vq_extnd (VdiHdl, short flag, short work_out[]) |
void | vqf_attributes (VdiHdl, short atrib[]) |
void | vqin_mode (VdiHdl, short dev, short *mode) |
void | vql_attributes (VdiHdl, short atrib[]) |
void | vqm_attributes (VdiHdl, short atrib[]) |
void | vqt_attributes (VdiHdl, short atrib[]) |
void | vqt_cachesize (VdiHdl, short which_cache, long *size) |
void | vqt_extent (VdiHdl, const char *str, short extent[]) |
void | vqt_extent16 (VdiHdl, const short *wstr, short extent[]) |
void | vqt_extent16n (VdiHdl, const short *wstr, short num, short extent[]) |
void | vqt_fontinfo (VdiHdl, short *minade, short *maxade, short distances[], short *maxwidth, short effects[]) |
void | vqt_get_table (VdiHdl, short **map) |
short | vqt_name (VdiHdl, short element, char *name) |
short | vqt_width (VdiHdl, short chr, short *cw, short *ldelta, short *rdelta) |
short | vq_gdos (void) |
long | vq_vgdos (void) |
inquiry functions
todo: add description here
void vq_cellarray | ( | short | handle, |
short | pxy[], | ||
short | row_len, | ||
short | nrows, | ||
short * | el_used, | ||
short * | rows_used, | ||
short * | status, | ||
short | color[] | ||
) |
returns the cell array definition of the specified pixels
handle | Device handle |
pxy | |
row_len | Length of each row in color index array. |
nrows | Number of rows in color index array |
el_used | Number of elements used in each row of color index array [option CHECK_NULLPTR] el_used may be NULL |
rows_used | Number of rows used in color index array [option CHECK_NULLPTR] rows_used may be NULL |
status | Invalid value flag:
|
color | Color index array, stored one row at time (-1) indicates that a color index could not be determined for that particular pixel |
Color indices are returned one row at a time, starting from the top of the rectangular area, proceeding downward.
References VDI_CNTRLMAX.
short vq_color | ( | short | handle, |
short | index, | ||
short | flag, | ||
short | rgb[] | ||
) |
returns the RGB color intensity for a color index. You can either request the realized intensities or you can get the intensities you tried to set with vs_color().
handle | Device handle |
index | color index (pen) |
flag | defined as follow:
|
rgb | intensity of red, green, blue |
@ note The color value you try to set via vs_color() can differ form the realized color value because a CLUT usually has less than 1000 levels per color component (e.g. 8 bit - 256 levels - per component). Most drivers for direct color devices return only the realized RGB value because the number of levels is sufficient.
References VDI_CNTRLMAX.
void vq_extnd | ( | short | handle, |
short | flag, | ||
short | work_out[] | ||
) |
This function either returns the output arguments of v_opnwk()/v_opnvwk() or additional device-specific information.
handle | Device handle |
flag | information type
|
work_out |
|
Note:
If work_out[20] contains a nonzero value, work_out[21..24] and work_out[40..43] will contain extended information about pixel size and not imprintable borders. Usually margins only are returned for printer drivers due to mechanical limitations of the printer. Applications should take the margins into account to center the document correctly and they should display the margins on screen.
The addressable raster size returned by v_opnwk() (work_in[0/1]) is the area that can be imprinted. That means the upper left corner (0,0) of the imprintable page has a distance of (work_out[40], work_out[41]) pixels from the upper left corner of the physical sheet of paper.
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).
The original ATARI VDI does not return the clipping flag (work_out[19]), but it returns the clipping rectangle.
You should not use the bezier flag (work_out[28]) to determine if the driver is capable of generating bezier curves because some drivers have bezier support but do not return the bezier flag. We recommend to use v_bez_on()!
References VDI_CNTRLMAX.
short vq_gdos | ( | void | ) |
TODO
long vq_vgdos | ( | void | ) |
TODO
void vqf_attributes | ( | short | handle, |
short | attrib[] | ||
) |
reports back the current attributes for filled objects.
handle | Device handle |
attrib | point to a 5-shorts array which will contain:
|
References VDI_CNTRLMAX.
void vqin_mode | ( | short | handle, |
short | dev, | ||
short * | mode | ||
) |
inquires the input mode of the specified device
handle | Device handle |
dev | input device (see vsin_mode()) |
mode | mode |
References VDI_CNTRLMAX.
void vql_attributes | ( | short | handle, |
short | attrib[] | ||
) |
This function returns the current line attributes
handle | Device handle |
attrib | contain the following informations:
|
References VDI_CNTRLMAX.
void vqm_attributes | ( | short | handle, |
short | attrib[] | ||
) |
reports back the current marker attributes
handle | Device handle |
attrib |
|
References VDI_CNTRLMAX.
void vqt_attributes | ( | short | handle, |
short | attrib[] | ||
) |
This function returns the current graphic text attributes
handle | Device handle |
attrib | defined as follow:
|
References VDI_CNTRLMAX.
void vqt_cachesize | ( | short | handle, |
short | which_cache, | ||
long * | size | ||
) |
handle | Device handle |
which_cache | |
size |
References VDI_CNTRLMAX, VDI_INTOUTMAX, and VDI_PTSOUTMAX.
void vqt_extent | ( | short | handle, |
const char * | str, | ||
short | extent[] | ||
) |
If the selected font is a bitmap font, this function returns the minimal bounding box of a string. If the selected font is a vector font, the character widths (vqt_width()) will be added and the string (especially the leftmost and the rightmost character) might exceed the returned rectangle.
handle | Device handle |
str | string |
extent | coordinates of the rectangle |
The coordinates of the rectangle are given relative to a coordinate system, where the extent rectangle touches both, the x and y axes, and the string is in the first quadrant.
References VDI_CNTRLMAX, VDI_INTINMAX, and vdi_str2array_n().
void vqt_extent16 | ( | short | handle, |
const short * | wstr, | ||
short | extent[] | ||
) |
see vqt_extent()
handle | Device handle |
wstr | string in 16-bit format (16 bits per character) |
extent | coordinates of the rectangle |
References VDI_CNTRLMAX, and vdi_wstrlen().
void vqt_extent16n | ( | short | handle, |
const short * | wstr, | ||
short | num, | ||
short | extent[] | ||
) |
see vqt_extent()
handle | Device handle |
wstr | string in 16-bit format (16 bits per character) |
num | length of the string |
extent | coordinates of the rectangle |
References VDI_CNTRLMAX.
void vqt_fontinfo | ( | short | handle, |
short * | minade, | ||
short * | maxade, | ||
short | distances[], | ||
short * | maxwidth, | ||
short | effects[] | ||
) |
returns size information for the current font. Special effects and enlargment are taken into account.
handle | Device handle |
minade | minimum character index [option CHECK_NULLPTR] minade may be NULL |
maxade | maximum character index [option CHECK_NULLPTR] maxade may be NULL |
distances |
|
maxwidth | maximum character cell width [option CHECK_NULLPTR] maxwidth may be NULL |
effects |
|
References VDI_CNTRLMAX.
void vqt_get_table | ( | short | handle, |
short ** | map | ||
) |
short vqt_name | ( | short | handle, |
short | element, | ||
char * | name | ||
) |
This function returns a 32-character string that describes the face.
handle | Device handle |
element | |
name |
name
is not 0 terminated ! References VDI_CNTRLMAX.
short vqt_width | ( | short | handle, |
short | chr, | ||
short * | cw, | ||
short * | ldelta, | ||
short * | rdelta | ||
) |
This call reports back the cell width for the specified character. If you have selected a vector font, the returned cell width is a rounded value. You can use this advance width for determing a character position when you use v_gtext() but you cannot use it for v_ftext() output.
handle | Device handle |
chr | character index |
cw | character cell width [option CHECK_NULLPTR] cw may be NULL |
ldelta | left character alignment delta [option CHECK_NULLPTR] ldelta may be NULL |
rdelta | right character alignment delta [option CHECK_NULLPTR] rdelta may be NULL |
Note:
To determine the width of a string, you should always call vqt_extent(), vqt_f_extent() or vqt_real_extent(). If you try to check whether a font is monospaced or proportional, you should test if vqt_name() returns extend information.
References VDI_CNTRLMAX.