This library contains functions to open and close working devices and to load fonts. Furthermore, these functions allow manipulation for Bezier spline creation and the management of vector font caches.
In total the following routines are available:
• v_bez_on | Switches on Bezier spline creation |
• v_bez_off | Switches off Bezier spline creation |
• v_clr_cachedir | No information available at present |
• v_clrwk | Reinitializes workstation |
• v_clsbm | Closes an off-screen bitmap |
• v_clsvwk | Closes a virtual screen workstation |
• v_clswk | Closes a physical workstation |
• v_def_cachedir | No information available at present |
• v_delete_cache | No information available at present |
• v_fgetoutline | No information available at present |
• v_flushcache | Clears vector font cachen. |
• v_get_cachedir | No information available at present |
• v_get_outline | Calculates outline of a character (improved version for NVDI) |
• v_getoutline | Calculates outline of a character |
• v_killoutline | Releases memory for outline generation |
• v_loadcache | Loads vector font cache |
• v_open_bm | Opens an off-screen bitmap (modernized version) |
• v_opnbm | Opens an off-screen bitmap |
• v_opnprn | Opens a printer driver |
• v_opnvwk | Opens a virtual screen workstation |
• v_opnwk | Opens a physical workstation. |
• v_pat_rotate | Rotates a pattern |
• v_resize_bm | Alters the size of an off-screen bitmap |
• v_savecache | Saves outline font cache to disk. |
• v_set_app_buff | Designates memory workspace for Bezier spline creation |
• v_set_cachedir | No information available at present. |
• v_updwk | Executes buffered workstation output commands |
• vs_backmap | No information available at present |
• vs_clip | Sets or deletes a clipping rectangle |
• vs_outmode | No information available at present |
• vs_use_fonts | No information available at present |
• vst_ex_load_fonts | Loads additional fonts (extended version) |
• vst_load_fonts | Loads fonts |
• vst_unload_fonts | nloads fonts |
See also: VDI workstations Style guidelines
Name: | »Disable Bezier capabilities« - Switch off Bezier spline
creation.
|
Opcode: | 11 (Sub-Opcode 13)
|
Syntax: | void v_bez_off ( int16_t handle );
|
Description: | The call v_bez_off deactivates the Bezier spline creation of
GDOS on the workstation with the ID handle and frees the
associated memory.
Note: Although handle specifies a given workstation, the deactivation applies to all workstations. |
Return value: | The function does not return a result.
|
Availability: | As of GEM/3 Release 3.1, FONTGDOS, FSMGDOS, from SpeedoGDOS
4.00 onwards, and as of NVDI 2.10.
|
Group: | Control functions
|
See also: | Binding v_bez_on v_bez v_bez_fill v_bez_qual
v_set_app_buff
|
C: | void v_bez_off ( int16_t handle );
|
Binding: |
void v_bez_off (int16_t handle) { contrl[0] = 11; contrl[1] = 0; contrl[3] = 0; contrl[5] = 13; contrl[6] = handle; vdi (); } |
GEM-Arrays: |
|
Name: | »Enable Bezier capabilities« - Switch on Bezier spline
creation.
|
Opcode: | 11 (Sub-Opcode 13)
|
Syntax: | int16_t v_bez_on ( int16_t handle );
|
Description: | The call v_bez_on activates the Bezier spline creation of GDOS
on the workstation with the ID handle.
Notes: Although handle specifies a given workstation, the activation applies to all workstations. This function is present for reasons of compatibility. It serves to make calls of v_pline without the sub-function number 13 to act as calls of v_bez, and calls of v_fillarea without the subfunction number to act as calls of v_bez_fill. The function is normally used only to check whether Beziers are present. |
Return value: | This function returns 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.
|
Availability: | As of GEM/3 Release 3.1, FONTGDOS, FSMGDOS, from SpeedoGDOS
4.00 onwards, and as of NVDI 2.10.
|
Group: | Control functions
|
See also: | Binding v_bez_off v_bez v_bez_fill v_bez_qual
v_set_app_buff
|
C: | int16_t v_bez_on ( int16_t handle );
| |||||||||||||||||||||||||||
Binding: |
int16_t v_bez_on (int16_t handle) { contrl[0] = 11; contrl[1] = 1; contrl[3] = 0; contrl[5] = 13; contrl[6] = handle; vdi (); return ( intout[0] ); } | |||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Clear workstation« - Reinitialize working device.
| ||||||||||||||
Opcode: | 3
| ||||||||||||||
Syntax: | void v_clrwk ( int16_t handle );
| ||||||||||||||
Description: | The call v_clrwk sets the physical workstation with the ID
handle to an exactly defined initial state. The following
apply:
Notes: With a v_opnwk call the relevant device (e.g. the screen) will be cleared automatically. Applying this function to a virtual workstation will clear the underlying physical workstation; generally this is not recommended as it will affect all virtual workstations, not just your own. | ||||||||||||||
Return value: | The function does not return a result.
| ||||||||||||||
Availability: | Supported by all drivers.
| ||||||||||||||
Group: | Control functions
| ||||||||||||||
See also: | Binding v_form_adv
|
C: | void v_clrwk ( int16_t handle );
|
Binding: |
void v_clrwk (int16_t handle) { contrl[0] = 3; contrl[1] = 0; contrl[3] = 0; contrl[6] = handle; vdi (); } |
GEM-Arrays: |
|
Name: | »Close bitmap« - Close an off-screen bitmap.
|
Opcode: | 101 (Sub-Opcode 1)
|
Syntax: | void v_clsbm ( int16_t handle );
|
Description: | The call v_clsbm closes the bitmap specified with
handle. The memory of the bitmap will be freed if the VDI
has allocated it.
|
Return value: | The function does not return a direct result.
|
Availability: | As of EdDI Version 1.00.
|
Group: | Control functions
|
See also: | Binding NVDI Off-screen bitmaps v_opnbm
|
C: | void v_clsbm ( int16_t handle );
|
Binding: |
void v_clsbm (int16_t handle) { contrl[0] = 101; contrl[1] = 0; contrl[3] = 0; contrl[5] = 1; contrl[6] = handle; vdi (); } |
GEM-Arrays: |
|
Name: | »Close virtual screen workstation« - Close a virtual screen
workstation.
|
Opcode: | 101
|
Syntax: | void v_clsvwk ( int16_t handle );
|
Description: | The call v_clsvwk closes the workstation with the ID
handle that was previously opened with v_opnvwk.
Note: This function must not be used if an error occurred while opening the workstation. |
Return value: | The function does not return a result.
|
Availability: | Supported by all drivers.
|
Group: | Control functions
|
See also: | Binding v_opnvwk v_clswk
|
C: | void v_clsvwk ( int16_t handle );
|
Binding: |
void v_clsvwk (int16_t handle) { contrl[0] = 101; contrl[1] = 0; contrl[3] = 0; contrl[6] = handle; vdi (); } |
GEM-Arrays: |
|
Name: | »Close workstation« - Close a physical workstation.
| ||||||||||||||
Opcode: | 2
| ||||||||||||||
Syntax: | void v_clswk ( int16_t handle );
| ||||||||||||||
Description: | The call v_clswk closes the device with the ID handle
that was opened previously with a v_opnwk call.
The function call has the following effects on the various device types:
Note: Before calling this function one should ensure that all virtual workstations on the corresponding device are closed. | ||||||||||||||
Return value: | The function does not return a result.
| ||||||||||||||
Availability: | Available only with some form of GDOS.
| ||||||||||||||
Group: | Control functions
| ||||||||||||||
See also: | Binding GDOS v_opnwk v_opnvwk v_clsvwk
|
C: | void v_clswk ( int16_t handle );
|
Binding: |
void v_clswk (int16_t handle) { contrl[0] = 2; contrl[1] = 0; contrl[3] = 0; contrl[6] = handle; vdi (); } |
GEM-Arrays: |
|
Name: | »Flush outline cache« - Clear vector font cache.
|
Opcode: | 251
|
Syntax: | int16_t v_flushcache ( int16_t handle );
|
Description: | The call v_flushcache clears the contents the outline (=
vector) character cache that holds the bitmaps of the vector
characters.
The parameter handle specifies the ID of the relevant workstation. |
Return value: | The function returns the value -1 in case of error, else the
value 0.
|
Availability: | FSMGDOS, as of SpeedoGDOS 4.00 and from NVDI 3.00 on; however,
no binding is shown for NVDI.
|
Group: | Control functions
|
See also: | Binding v_loadcache v_savecache vqt_cachesize
|
C: | int16_t v_flushcache ( int16_t handle );
|
Binding: |
int16_t v_flushcache ( int16_t handle ); { contrl[0] = 251; contrl[1] = 0; contrl[3] = 0; contrl[6] = handle; vdi (); return ( intout[0] ); } |
GEM-Arrays: |
|
Name: | »Get character outline« - Calculate outline of a vector
character.
| ||||||||||||||||
Opcode: | 243
| ||||||||||||||||
Syntax: | void v_getoutline ( int16_t handle, int16_t ch, int16_t
*xyarray, int8_t *bezarray, int16_t maxpts, int16_t *count );
| ||||||||||||||||
Description: | The call v_getoutline uses Bezier curves to create the outline
that belongs to a given vector character. The following apply:
Note: The returned values can be passed directly to the output function for Bezier splines (v_bez, v_bez_fill). If one wants to use the information from this function as a vector graphic, say as a part of a metafile, then it is recommended that a large text height is set before the call; otherwise the quality of the returned Bezier may be quite poor, as the internal presentation in 1/65536 pixels is rounded off to integer fixed point pixels, i.e. 16 bits will be lost. The text height should be oriented to the raster resolution of the font outline, as returned by the function vqt_fontheader. | ||||||||||||||||
Return value: | The function does not return a result.
| ||||||||||||||||
Availability: | As of SpeedoGDOS 4.00 and from NVDI 3.00 on.
| ||||||||||||||||
Group: | Control functions
| ||||||||||||||||
See also: | Binding v_get_outline v_killoutline SpeedoGDOS NVDI
fix31
|
C: | void v_getoutline ( int16_t handle, int16_t ch, int16_t
*xyarray, int8_t *bezarray, int16_t maxpts, int16_t *count );
| ||||||||||||||||||||||||||||||||||||
Binding: |
void v_getoutline (int16_t handle, int16_t ch, int16_t *xyarray, int8_t *bezarray, int16_t maxpts, int16_t *count) { intin[0] = ch; intin[1] = maxpts; intin[2..3] = xyarray; intin[4..5] = bezarray; contrl[0] = 243; contrl[1] = 0; contrl[3] = 6; contrl[6] = handle; vdi (); *count = intout[0]; } | ||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Get character outline« - Calculate outline of a character
(improved version).
| ||||||||||||||||||
Opcode: | 243 (Sub-Opcode 1)
| ||||||||||||||||||
Syntax: | int16_t v_get_outline ( int16_t handle, uint16_t index,
uint16_t x_offset, uint16_t y_offset, int16_t *xyarray, uint8_t
*bezarray, int16_t max_pts );
| ||||||||||||||||||
Description: | The call v_get_outline creates the outline that belongs to a
given character. This improved version of v_getoutline:
Note 1: The returned values can be passed directly to the output function for Bezier splines (v_bez, v_bez_fill). Note 2: With the previous v_getoutline (old Speedo function), rotation did not work at all, and alignment was ignored as well. Furthermore, with Speedo fonts the Y-coordinate 0 corresponded to the top coordinate used in the character (so, depending on the character, was positioned somewhere within the character cell), while with Postscript and TrueType fonts the Y-coordinate 0 always corresponded to the top edge of the character cell. | ||||||||||||||||||
Return value: | The function returns the number of vertices output.
| ||||||||||||||||||
Availability: | As of NVDI 5.00.
| ||||||||||||||||||
Group: | Control functions
| ||||||||||||||||||
See also: | Binding v_getoutline v_killoutline SpeedoGDOS NVDI
fix31
|
C: | int16_t v_get_outline ( int16_t handle, uint16_t index,
uint16_t x_offset, uint16_t y_offset, int16_t *xyarray, uint8_t
*bezarray, int16_t max_pts );
| |||||||||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t v_get_outline ( int16_t handle, uint16_t index, uint16_t x_offset, uint16_t y_offset, int16_t *xyarray, uint8_t *bezarayr, int16_t max_pts ) { intin[0] = index; intin[1] = max_pts; intin[2..3] = xyarray; intin[4..5] = bezarray; intin[6] = x_offset; intin[7] = y_offset; contrl[0] = 243; contrl[1] = 0; contrl[3] = 8; contrl[5] = 1; contrl[6] = handle; vdi (); return ( intout[0] ); } | |||||||||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Kill FSM outline« - Release memory for outline generation
| ||||||||
Opcode: | 242
| ||||||||
Syntax: | void v_killoutline ( int16_t handle, fsm_component_t *component
);
| ||||||||
Description: | The call v_killoutline releases the memory allocated for the
creation of font outlines. The following apply:
Note: The function should always be called as soon as an outline is no longer needed. Otherwise there is a risk of running out of memory. | ||||||||
Return value: | The function does not return a result.
| ||||||||
Availability: | In FSMGDOS; no longer needed from SpeedoGDOS 4.00 on, so is not
documented further.
| ||||||||
Group: | Control functions
| ||||||||
See also: | GDOS SpeedoGDOS v_getoutline
|
Name: | »Load outline cache« - Load vector font cache.
| ||||||||||||||
Opcode: | 250
| ||||||||||||||
Syntax: | int16_t v_loadcache ( int16_t handle, int8_t *filename, int16_t
mode );
| ||||||||||||||
Description: | The call v_loadcache fills the vector character cache with the
contents of a previously saved file. The following apply:
| ||||||||||||||
Return value: | The function returns the value -1 in case of error, else the
value 0.
| ||||||||||||||
Availability: | FSMGDOS, as of SpeedoGDOS 4.00.
| ||||||||||||||
Group: | Control functions
| ||||||||||||||
See also: | Binding v_flushcache v_savecache vqt_cachesize
|
C: | int16_t v_loadcache ( int16_t handle, int8_t *filename, int16_t
mode );
| ||||||||||||||||||||||||||||||
Binding: |
int16_t v_loadcache ( int16_t handle, int8_t *filename, int16_t mode ) { intin[0] = mode; intin[1..n] = filename; contrl[0] = 250; contrl[1] = 0; contrl[3] = 1+n; contrl[6] = handle; vdi (); return ( intout[0] ); } | ||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Load outline cache« - Load vector font cache.
| ||||||||||||||
Opcode: | 226 (Subcode 7)
| ||||||||||||||
Syntax: | int16_t v_load_cache ( int16_t handle, int8_t *filename,
int16_t mode );
| ||||||||||||||
Description: | The call v_load_cache fills the vector character cache with the
contents of a previously saved file. The following apply:
| ||||||||||||||
Return value: | The function returns the value -1 in case of error, else the
value 0.
| ||||||||||||||
Availability: | As of SpeedoGDOS 5.1.
| ||||||||||||||
Group: | Control functions
| ||||||||||||||
See also: | Binding v_flushcache v_savecache v_loadcache
vqt_cachesize
|
C: | int16_t v_load_cache ( int16_t handle, int8_t *filename,
int16_t mode );
| |||||||||||||||||||||||||||||||||
Binding: |
int16_t v_load_cache ( int16_t handle, int8_t *filename, int16_t mode ) { intin[0] = mode; intin[1..n] = filename; contrl[0] = 226; contrl[1] = 0; contrl[3] = 1+n; contrl[5] = 7; contrl[6] = handle; vdi (); return ( intout[0] ); } | |||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Open bitmap« - Open an off-screen bitmap (modernized
version)
| ||||||||||||||||||||||||||||||||||||||||||
Opcode: | 100 (Sub-Opcode 3)
| ||||||||||||||||||||||||||||||||||||||||||
Syntax: | int16_t v_open_bm ( int16_t base_handle, GCBITMAP *bitmap,
int16_t color_flags, int16_t unit_flags, int16_t pixel_width, int16_t
pixel_height );
| ||||||||||||||||||||||||||||||||||||||||||
Description: | The call v_open_bm serves for the creation of off-screen
bitmaps. One can either specify the size of a bitmap that it should
allocate, or pass a bitmap to it. The bitmap is managed in the same
format as that of the screen, which makes fast copying between the two
possible.
v_open_bm is the modern variant of v_opnbm and works with the same bitmap and pixel format description as vr_transfer_bits. The following apply:
Additionally, the pixel size is passed in pixel_width and pixel_height, so that the fonts may be scaled correctly. If one of these two entries is 0, the task will be taken on by base_handle. The size specifications will be interpreted dependent on unit_flags: -1: Specification in dpi 0: Specification in microns (1/1000 mm) 1: Specification in 1/10 microns (1/10000 mm) 2: Specification in 1/100 microns (1/100000 mm) 3: Specification in 1/1000 microns (1/1000000 mm) As ctab is ignored, a system colour table corresponding to the colour depth will be created for the bitmap in CSPACE_RGB (RGB) colour space. The variable <zero> is present for possible later extensions in this area, which therefore has to be set to 0 at present. | ||||||||||||||||||||||||||||||||||||||||||
Return value: | If the function is successful, a non-zero handle will be
returned. If the VDI has reserved memory for the bitmap and only an
empty (or only partially filled) GCBITMAP structure has been passed in
the call, the structure is initialized completely after the call.
Programs may not alter either the colour table nor the inverse colour
table of the structure with a direct access. All changes must be made
with the colour functions under the returned handle.
| ||||||||||||||||||||||||||||||||||||||||||
Availability: | As of EdDI Version 1.20.
| ||||||||||||||||||||||||||||||||||||||||||
Group: | Control functions
| ||||||||||||||||||||||||||||||||||||||||||
See also: | Binding NVDI Off-screen bitmaps v_clsbm
|
C: | int16_t v_open_bm ( int16_t base_handle, GCBITMAP *bitmap,
int16_t color_flags, int16_t unit_flags, int16_t pixel_width, int16_t
pixel_height );
| ||||||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t v_open_bm ( int16_t base_handle, GCBITMAP *bitmap, int16_t color_flags, int16_t unit_flags, int16_t pixel_width, int16_t pixel_height ) { intin[0] = color_flags; intin[1] = unit_flags; intin[2] = pixel_width; intin[3] = pixel_height; contrl[0] = 100; contrl[1] = 0; contrl[3] = 4; contrl[5] = 3; contrl[6] = base_handle; contrl[7..8] = bitmap; vdi (); return ( contrl[6] ); } | ||||||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Open bitmap« - Open an off-screen bitmap.
| ||||||||||||||||||||||||||
Opcode: | 100 (Sub-Opcode 1)
| ||||||||||||||||||||||||||
Syntax: | void v_opnbm ( int16_t *work_in, MFDB *bitmap, int16_t *handle,
int16_t *work_out );
| ||||||||||||||||||||||||||
Description: | The call v_opnbm serves for the creation of off-screen bitmaps.
One can either specify the size of a bitmap that it should allocate,
or pass a bitmap to it. The bitmap is managed in the same format as
that of the screen, which makes fast copying between the two
possible.The following apply:
If the EdDI cookie has version number 1.1 or newer, v_opnbm takes additional arguments in work_in[15..19] into account: An attempt is made then to open a bitmap in the format described by these parameters. If there is no driver for the specified format, then the bitmap cannot be created. The following apply:
Pixel format and bit order are described in greater detail in vq_scrninfo. With the following parameters, for instance, one can create an off-screen bitmap with 256 colours and interleaved planes: work_in[15..16] = 256; /* 256 colours */ work_in[17] = 8; /* 8 Planes */ work_in[18] = 0; /* Interleaved planes */ work_in[19] = 1; /* Normal bit order */ Attention: work_in[11] + 1 should be divisible by 16 without remainder. Otherwise the VDI driver will round up (work_in[11] + 1) to the next number which can be divided by 16 without remainder. If pixel width and height are 0 the pixel size of the screen workstation is used. Note: The use of off-screen bitmaps can be useful if one wants to avoid effects such as heavy flicker on the screen. In that case one builds up the parts of the graphic in the bitmap and transfers the bitmap with vrt_cpyfm or vro_cpyfm to the screen. | ||||||||||||||||||||||||||
Return value: | Information is passed to the outside via the work_out
array or the Memory Form Definiton Block (MFDB):
If bitmap->fd_addr is zero, the VDI will allocate memory for the bitmap and will clear it (in contrast to v_opnvwk). To open a bitmap in device-specific format, bitmap->fd_nplanes should be zero, or the number of planes of the screen (work_out[4] from vq_extnd). If bitmap->fd_nplanes is 1, a monochrome bitmap will be created. The elements of the MFDB (fd_addr, fd_w, fd_h, fd_wdwidth, fd_stand, fd_nplanes) are set by the VDI before returning from v_opnbm. If there is not enough memory to create a bitmap the handle will be zero and the MFDB will not be changed. If bitmap->fd_addr is not zero, it will be used as pointer to a bitmap. If the bitmap is in standard format, it will be transformed into device-specific format. If the number of planes of the bitmap is not supported by the VDI, a zero handle will be returned. | ||||||||||||||||||||||||||
Availability: | The function is available as of EdDI Version 1.00. From EdDI
1.1 onwards, v_opnbm can be called with additional parameters.
| ||||||||||||||||||||||||||
Group: | Control functions
| ||||||||||||||||||||||||||
See also: | Binding NVDI Off-screen bitmaps v_clsbm
|
C: | void v_opnbm ( int16_t *work_in, MFDB *bitmap, int16_t *handle,
int16_t *work_out );
| ||||||||||||||||||||||||||||||||||||
Binding: |
void v_opnbm (int16_t *work_in, MFDB *bitmap, int16_t *handle, int16_t *work_out) { intin[0..19] = work_in[0..19]; contrl[0] = 100; contrl[1] = 0; contrl[3] = 20; contrl[5] = 1; contrl[6] = handle; contrl[7..8] = bitmap; vdi (); *handle = contrl[6]; work_out[0..44] = intout[0..44]; work_out[45..56] = ptsout[0..11]; } | ||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Open printer driver«
| ||||||||||
Opcode: | 1
| ||||||||||
Syntax: | int16_t v_opnprn( int16_t base_handle, PRN_SETTINGS *settings,
int16_t *work_out );
| ||||||||||
Description: | The call v_opnprn opens a printer driver. The following apply:
| ||||||||||
Return value: | VDI handle, or 0 (error)
| ||||||||||
Availability: | The passing of PRN_SETTINGS is possible as of NVDI 4.1x (27.11.96).
The binding appears for the first time in NVDI 5.00.
| ||||||||||
Group: | Control functions
| ||||||||||
See also: | Binding
|
C: | int16_t v_opnprn( int16_t base_handle, PRN_SETTINGS *settings,
int16_t *work_out );
| |||||||||||||||||||||||||||||||||
Binding: |
int16_t v_opnprn( int16_t base_handle, PRN_SETTINGS *settings, int16_t *work_out ) { int16 work_in[16]; int16 i; vdi_pb.intin = (int *) work_in; vdi_pb.intout = (int *) work_out; vdi_pb.ptsout = (int *) work_out + 45; /* Driver number */ work_in[0] = settings->driver_id; for ( i = 1; i < 10; i++ ) work_in[i] = 1; /* Use raster coordinates */ work_in[10] = 2; /* Use page format from settings */ work_in[11] = (int16) settings->size_id; /* Use output channel from settings */ *(int8 **) &work_in[12] = settings->device; /* Printer settings */ *(PRN_SETTINGS **) &work_in[14] = settings; contrl[0] = 1; /* Function number */ contrl[1] = 0; contrl[3] = 16; /* Extended parameter number */ contrl[6] = base_handle; vdi( &vdi_pb ); /* Open driver */ vdi_pb.intin = (int *) intin; /* Reset pointer */ vdi_pb.intout = (int *) intout; vdi_pb.ptsout = (int *) ptsout; return( contrl[6] ); } | |||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Open virtual screen workstation« - Open a screen
workstation.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Opcode: | 100
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Syntax: | void v_opnvwk ( int16_t *work_in, int16_t *handle, int16_t
*work_out );
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The call v_opnvwk opens a virtual VDI workstation on an
already opened physical device. After the call the parameter
handle receives the ID of the virtual device, or the value 0
in case of error. The following aply:
Note: Unfortunately the VDI has no mechanism to manage the input devices for multiple workstations. Therefore this has to be taken on by the application that has opened the physical workstation of the screen. Important: The ID of the current physical screen workstation must be established from the AES with graf_handle. Warning: In the TOS versions 1.00, 1.04, 1.06, 1.62 and 2.05 there is an error in the management of the virtual workstations. This can show itseslf in the multiple assignation of IDs, and hence the workstation attributes may be misplaced in some circumstances. This error appears if there are gaps in the internal workstation list of the screen driver. Remedy: Place the patch-program VDIFIX in the AUTO folder. The error is present also on TOS 2.06 and on early (built before 31.05.1990) TOS 3.00 builds. Unfortunately, no patch is available for those TOS versions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Return value: | The function returns no direct result.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Availability: | Supported by all drivers.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Group: | Control functions
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See also: | Binding v_opnwk v_clsvwk graf_handle
|
C: | void v_opnvwk ( int16_t *work_in, int16_t *handle, int16_t
*work_out );
| ||||||||||||||||||||||||||||||
Binding: |
void v_opnvwk (int16_t *work_in, int16_t *handle, int16_t *work_out) { intin[0..10] = work_in[0..10] contrl[0] = 100; contrl[1] = 0; contrl[3] = 11; contrl[6] = *handle; vdi (); *handle = contrl[6]; work_out[0..44] = intout[0..44]; work_out[45..56] = ptsout[0..11]; } | ||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Open workstation« - Initialize a device driver for a
specified input/output device.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Opcode: | 1
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Syntax: | void v_opnwk ( int16_t *work_in, int16_t *handle, int16_t
*work_out );
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The call v_opnwk opens a physical workstation to load a device
driver. However, for this to work, a GDOS (or its equivalent) must be
present in memory and the device driver must be listed in the
ASSIGN.SYS file. If all went well handle will contain a
positive device ID, or 0 in case of error.
Notes: The components work_in[11] to work_in[15] are only useful under NVDI and allow setting the page format for printers and bit-image drivers, as well as the output channel. For a metafile driver the setting of the page format will not take effect; only the filename will be adopted here. To check whether the page or paper format was set successfully one should fall back on the function vq_extnd. The values returned in the elements work_out[0,1] show the actual printable area; the non-printable areas can be obtained with vq_extnd. The allocation of the work_in and work_out arrays given here is no longer fully compatible to PC-GEM, as from GEM/3 onwards a number of considerable changes or extensions were made that were either not adopted on the Atari or were made in a different manner. Physical workstations should be opened only when they are needed, and closed immediately afterwards; so, for instance, a word processor should not open the printer driver when the application launches and close it when it ends, as otherwise the user will not be able to change printers with a printer setup CPX. Warning: With printer drivers, and specially with the Atari SLM laser page-printers, some special features have to be heeded. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Return value: | The function returns no direct result.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Availability: | Available only with some forms of GDOS.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Group: | Control functions
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See also: | Binding GDOS v_clswk v_opnvwk
|
C: | void v_opnwk ( int16_t *work_in, int16_t *handle, int16_t
*work_out );
| ||||||||||||||||||||||||||||||||||||||||
Binding: |
void v_opnwk (int16_t *work_in, int16_t *handle, int16_t *work_out) { intin[0..15] = work_in[0..15]; contrl[0] = 1; contrl[1] = 0; contrl[3] = 16; contrl[6] = 0; vdi (); *handle = contrl[6]; work_out[0..44] = intout[0..44]; work_out[45..56] = ptsout[0..11]; } | ||||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
Note: The specified binding is valid for use under NVDI. With printer drivers some special features have to be taken into account: First of all, with matrix printers the maximum resolution can be specified, as follows:
In addition, the address of the internal buffer for the Atari SLM laser page-printers can be obtained:
| ||||||||||||||||||||||||||||||||||||||||
See also: | v_opnwk GDOS GDOS drivers
|
From PC-GEM/3 onwards the work_in field of v_opnwk was extended, so that one could still undertake some driver settings at runtime. The following information however is not compatible to Atari GEM or to NVDI. The following apply:
Element | Meaning | ||||||||||||||||||||||||||||
work_in[11] | In the lower value byte the output is specified more exactly.
Output is to:
In the higher value byte the page size is specified:
| ||||||||||||||||||||||||||||
work_in[12] | Output port or filename | ||||||||||||||||||||||||||||
... | |||||||||||||||||||||||||||||
... | |||||||||||||||||||||||||||||
work_in[100] | |||||||||||||||||||||||||||||
work_in[101] | Page width in 1/100 inch | ||||||||||||||||||||||||||||
work_in[102] | Page height in 1/100 inch | ||||||||||||||||||||||||||||
work_out[14] | Has the value 11 if escapement text is available | ||||||||||||||||||||||||||||
work_out[24] | Has the value 1 if escapement text is the only available text on the output device, or otherwise the value 10 | ||||||||||||||||||||||||||||
work_out[44] | A value of -1 means that the output device can output in landscape format without the application having to rotate the graphic itself. The OUTPUT program of PC-GEM however takes on the rotation itself, as this option was not yet available in older GEM versions. |
Note: If work_in[11] has the value 1 or 2, then work_in[12] must be set to the port number (LPT1 = 0, LPT2 = 1, COM1 = 0, etc.). On the other hand if work_in[11] has the value 0, then the name of the file which is to be written must be contained in work_in[12] onwards; this will be written character by character (16-bit WORDS) and must be NULL-terminated.
See also: Control functions v_opnwk
Name: | »Pattern rotation«
| ||||||||
Opcode: | 134
| ||||||||
Syntax: | void v_pat_rotate( int16_t handle, int16_t angle)
| ||||||||
Description: | The call v_pat_rotate specifies a pattern rotation angle. It is
implemented only in printer drivers and is restricted to multiples of
90 degrees.
| ||||||||
Return value: | The function does not return a result.
| ||||||||
Availability: | GEM/3 Release 3.1
| ||||||||
Group: | Control functions
| ||||||||
See also: | Binding
|
C: | void v_pat_rotate( int16_t handle, int16_t angle );
|
Binding: |
void v_pat_rotate( int16_t handle, int16_t angle ) { intin[0] = angle; contrl[0] = 134; contrl[1] = 0; contrl[3] = 1; contrl[6] = handle; vdi (); } |
GEM-Arrays: |
|
Name: | »Resize bitmap« - Alter the size of an off-screen bitmap.
| ||||||||||||||
Opcode: | 100 (Sub-Opcode 2)
| ||||||||||||||
Syntax: | int16_t v_resize_bm( int16_t handle, int16_t width, int16_t
height, int32_t byte_width, uint16_t *addr );
| ||||||||||||||
Description: | With the function v_resize_bm the size of an off-screen bitmap
may be changed. The function can also be passed its own block of
memory, for which then the following points must be abided by:
If you do not take heed of this, you may be blessed with some nasty memory collisions! Hence we recommend leaving memory allocation to the NVDI!
| ||||||||||||||
Return value: | If the function result is 0 then the new bitmap could not be
built up. As the old bitmap has been released already in this case,
one can attempt to create a smaller bitmap, or the bitmap must be
closed with v_clsbm.
| ||||||||||||||
Availability: | As of EdDI Version 1.20
| ||||||||||||||
Group: | Control functions
| ||||||||||||||
See also: | Binding NVDI Off-screen bitmaps
|
C: | int16_t v_resize_bm( int16_t handle, int16_t width, int16_t
height, int32_t byte_width, uint16_t *addr );
| |||||||||||||||||||||||||||||||||||||||
Binding: |
int16_t v_resize_bm( int16_t handle, int16_t width, int16_t height, int32_t byte_width, uint16_t *addr ) { intin[0] = width; intin[1] = height; intin[2..3] = byte_width; intin[4..5] = addr; contrl[0] = 100; contrl[1] = 0; contrl[3] = 6; contrl[5] = 2; contrl[6] = handle; vdi (); return ( intout[0] ); } | |||||||||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Save outline cache to disk« - Save the contents of the
vector (outline) font cache.
| ||||||||
Opcode: | 249
| ||||||||
Syntax: | int16_t v_savecache ( int16_t handle, int8_t *filename );
| ||||||||
Description: | The call v_savecache saves the contents of the vector font
cache to a file. The following apply:
Note: The file will be stored in the current directory. | ||||||||
Return value: | The function returns the value -1 in case of error, else the
value 0.
| ||||||||
Availability: | FSMGDOS, from SpeedoGDOS 4.00 onwards.
| ||||||||
Group: | Control functions
| ||||||||
See also: | Binding v_flushcache v_loadcache vqt_cachesize
|
C: | int16_t v_savecache ( int16_t handle, int8_t *filename );
| |||||||||||||||||||||||||||
Binding: |
int16_t v_savecache ( int16_t handle, int8_t *filename ) { intin[0..n] = filename; /* In 16-bit words */ contrl[0] = 249; contrl[1] = 0; contrl[3] = n; contrl[6] = handle; vdi (); return ( intout[0] ); } | |||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Save outline cache to disk« - Save the contents of the
vector (outline) font cache.
| ||||||||
Opcode: | 226 (Subcode 6)
| ||||||||
Syntax: | int16_t v_save_cache ( int16_t handle, int8_t *filename );
| ||||||||
Description: | The call v_save_cache saves the contents of the vector font
cache to a file. The following apply:
Note: The file will be stored in the current directory. | ||||||||
Return value: | The function returns the value -1 in case of error, else the
value 0.
| ||||||||
Availability: | from SpeedoGDOS 5.1 onwards.
| ||||||||
Group: | Control functions
| ||||||||
See also: | Binding v_flushcache v_savecache v_loadcache
vqt_cachesize
|
C: | int16_t v_save_cache ( int16_t handle, int8_t *filename );
| ||||||||||||||||||||||||||||||
Binding: |
int16_t v_save_cache ( int16_t handle, int8_t *filename ) { intin[0..n] = filename; /* In 16-bit words */ contrl[0] = 226; contrl[1] = 0; contrl[3] = n; contrl[5] = 6; contrl[6] = handle; vdi (); return ( intout[0] ); } | ||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Reserve Bezier workspace« - Designate memory for generating
Bezier splines.
| ||||||||||
Opcode: | -1
| ||||||||||
Syntax: | void v_set_app_buff ( int16_t handle, int16_t **address,
int16_t nparagraphs );
| ||||||||||
Description: | The call v_set_app_buff designates buffer memory for use by the
Bezier spline generation routines. The following apply:
Note: If Bezier functions are called then the spline data will be stored in this buffer. Before program termination one should use this function to set a NULL pointer as a buffer of size 0. The application is then responsible for deallocating the reserved memory. If this function is not called by the application then GDOS will create its own buffer of around 8 kbyte. | ||||||||||
Return value: | The function does not return a result.
| ||||||||||
Availability: | FONTGDOS, FSMGDOS, as of GEM/3 Release 3.1, from SpeedoGDOS
4.00 and from NVDI 2.10 on. The function surfaces in the (paper)
documentation for NVDI 2.10, but no longer in all remaining
descriptions.
| ||||||||||
Group: | Control functions
| ||||||||||
See also: | Binding v_bez_on v_bez_off v_bez v_bez_fill v_bez_qual
GDOS SpeedoGDOS
|
C: | void v_set_app_buff ( int16_t handle, int16_t **address,
int16_t nparagraphs );
| ||||||||||||||||||||||||||||||
Binding: |
void v_set_app_buff ( int16_t handle, int16_t **address, int16_t nparagraphs ) { intin[0..1] = address; intin[2] = nparagraphs; contrl[0] = -1; contrl[1] = 0; contrl[3] = 3; contrl[5] = 6; contrl[6] = handle; vdi (); } | ||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Update workstation« - Execute buffered output commands.
|
Opcode: | 4
|
Syntax: | void v_updwk ( int16_t handle );
|
Description: | The call v_updwk induces the output device with the ID
handle to execute all buffered output commands.
Note: On the screen or with off-screen bitmaps this function is not required, as here all graphics commands are carried out immediately. With a printer no form-feed will be performed, while with a metafile only the opcode is written to the buffer. Incidentally, before print output the function should be called once to initialize the printer. There are some special features that have to be heeded with printer drivers, and specially with the Atari SLM laser page-printers. |
Return value: | The function does not return a result.
|
Availability: | Supported by all printer, metafile, plotter, and camera devices
when using any form of GDOS.
|
Group: | Control functions
|
See also: | Binding v_opnwk v_output_window
|
C: | void v_updwk ( int16_t handle );
| |||||||||||||||||||||||||||||||||
Binding: |
void v_updwk (int16_t handle) { contrl[0] = 4; contrl[1] = 0; contrl[3] = 0; contrl[6] = handle; vdi (); } | |||||||||||||||||||||||||||||||||
GEM-Arrays: |
Note: With printer drivers, one can output also a custom buffer instead of the current page. This is done as follows: intin[0] = High word, (!U)and(!u) intin[1] = Low word of the buffer address contrl[0] = 4; contrl[1] = 1; /* Do not clear buffer */ contrl[3] = 2; contrl[6] = handle; vdi (); For laser printers of the Atari SLM series one can also obtain the status of the output device. The following apply:
| |||||||||||||||||||||||||||||||||
See also: | v_updwk Control functions GDOS GDOS drivers
|
Name: | »Set clipping rectangle«
| ||||||||||||||||||||
Opcode: | 129
| ||||||||||||||||||||
Syntax: | void vs_clip ( int16_t handle, int16_t clip_flag, int16_t
*pxyarray );
| ||||||||||||||||||||
Description: | The call vs_clip limits all graphical output to a given region.
The following apply:
Note: Do not switch off clipping, because a graphic object which is drawn outside of the visible screen area will overwrite memory or cause a bus error. If the working area is to include the complete screen, it is advisable to set the screen dimensions for vs_clip obtained from v_opnvwk. | ||||||||||||||||||||
Return value: | The function does not return a result.
| ||||||||||||||||||||
Availability: | Supported by all drivers.
| ||||||||||||||||||||
Group: | Control functions
| ||||||||||||||||||||
See also: | Binding Clipping
|
C: | void vs_clip ( int16_t handle, int16_t clip_flag, int16_t
*pxyarray );
| |||||||||||||||||||||||||||
Binding: |
void vs_clip (int16_t handle, int16_t clip_flag, int16_t *pxyarray) { intin[0] = clip_flag; ptsin[0..3] = pxyarray[0..3]; contrl[0] = 129; contrl[1] = 2; contrl[3] = 1; contrl[6] = handle; vdi (); } | |||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Load fonts« - Extended version of additional font loading
routine.
| ||||||||||||
Opcode: | 119
| ||||||||||||
Syntax: | int16_t vst_ex_load_fonts ( int16_t handle, int16_t select,
int16_t font_max, int16_t font_free );
| ||||||||||||
Description: | The call vst_ex_load_fonts is an extension of the existing
vst_load_fonts call, with two additional input arguments to provide
control over font paging memory. The current defaults in units of
paragraphs are:
font_max font_free For screens: 5120 (80K) 0 For printers: 32767 640 (10K) The GDOS attempts to allocate font_max paragraphs or all of available menory (whichever is smaller) less font_free paragraphs, and use this amount for font paging. Depending on your needs, you can use either version of this call. Note that both version use the same opcode.
| ||||||||||||
Return value: | The number of loaded fonts.
| ||||||||||||
Availability: | GEM/3 Release 3.1
| ||||||||||||
Group: | Control functions
| ||||||||||||
See also: | Binding vst_unload_fonts vst_font vqt_name ASSIGN.SYS file
GDOS
|
C: | int16_t vst_ex_load_fonts ( int16_t handle, int16_t select,
int16_t font_max, int16_t font_free );
| |||||||||||||||||||||||||||||||||
Binding: |
int16_t vst_ex_load_fonts ( int16_t handle, int16_t select, int16_t font_max, int16_t font_free ) { intin[0] = select; intin[1] = font_max; intin[2] = font_free; contrl[0] = 119; contrl[1] = 0; contrl[3] = 3; contrl[6] = handle; vdi (); return ( intout[0] ); } | |||||||||||||||||||||||||||||||||
GEM-Arrays: |
|
Name: | »Load fonts«
| ||||||||
Opcode: | 119
| ||||||||
Syntax: | int16_t vst_load_fonts ( int16_t handle, int16_t select );
| ||||||||
Description: | The call vst_load_fonts loads further font information from
disk into memory for the workstation with the ID handle; the
fonts have to be listed in the ASSIGN.SYS file.
Note: Before you call vst_load_fonts, call vq_gdos and make sure that the VDI can load additional fonts. | ||||||||
Return value: | This will be the number of additional fonts loaded. If the
function is called more than once before using vst_unload_fonts, the
return will be 0.
| ||||||||
Availability: | Available with any form of GDOS.
| ||||||||
Group: | Control functions
| ||||||||
See also: | Binding vst_unload_fonts vst_font vqt_name ASSIGN.SYS file
GDOS
|
C: | int16_t vst_load_fonts ( int16_t handle, int16_t select );
|
Binding: |
int16_t vst_load_fonts (int16_t handle, int16_t select) { intin[0] = select; contrl[0] = 119; contrl[1] = 0; contrl[3] = 1; contrl[6] = handle; vdi (); return ( intout[0] ); } |
GEM-Arrays: |
|
Name: | »Unload fonts« - Remove loaded fonts.
| ||||||||
Opcode: | 120
| ||||||||
Syntax: | void vst_unload_fonts ( int16_t handle, int16_t select );
| ||||||||
Description: | The call vst_unload_fonts removes all fonts that were loaded
previously by a vst_load_fonts call, and frees the associated memory.
The following apply:
Note: System and vector fonts are not affected by this function. | ||||||||
Return value: | The function does not return a result.
| ||||||||
Availability: | Available with any form of GDOS.
| ||||||||
Group: | Control functions
| ||||||||
See also: | Binding GDOS vst_load_fonts
|
C: | void vst_unload_fonts ( int16_t handle, int16_t select );
|
Binding: |
void vst_unload_fonts (int16_t handle, int16_t select) { intin[0] = select; contrl[0] = 120; contrl[1] = 0; contrl[3] = 1; contrl[6] = handle; vdi (); } |
GEM-Arrays: |
|