home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / gempp15b / vdi.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-23  |  17.9 KB  |  427 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  This file is Copyright 1992,1993 by Warwick W. Allison.
  4. //  This file is part of the gem++ library.
  5. //  You are free to copy and modify these sources, provided you acknowledge
  6. //  the origin by retaining this notice, and adhere to the conditions
  7. //  described in the file COPYING.LIB.
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10.  
  11. #include "vdi.h"
  12. #include <vdibind.h>
  13. #include <aesbind.h>
  14. #include <values.h>
  15.  
  16. #include <stdio.h>
  17.  
  18.  
  19. #define USEME
  20. // The following is an interesting hack.  It works, but it's NOT NICE!
  21. //#define USEME if (this!=CurrentVDI) BeCurrent()
  22. //#include <osbind.h>
  23. // My first attempt to make TRULY virtual devices.
  24. // When I get info on GDOS's MEMORY.SYS driver, I hope to use that.
  25. //
  26. //static VDI* CurrentVDI=0;
  27. //void VDI::BeCurrent()
  28. //{
  29. //    CurrentVDI=this;
  30. //    if (mfdb.fd_addr) Setscreen(mfdb.fd_addr,-1,-1);
  31. //}
  32.  
  33.  
  34. static const NWI=11;
  35. static const NWO=64;
  36. static int StdWorkIn[]={1,1,1,1,1,1,1,1,1,1,2};
  37.  
  38.  
  39. VDI::VDI() :
  40.     WorkIn(new int[NWI]),
  41.     WorkOut(new int[NWO]),
  42.     ExtWorkOut(new int[NWO])
  43. {
  44.     int j;
  45.     for (j=0; j<NWI; j++) WorkIn[j]=StdWorkIn[j];
  46.     Handle=graf_handle(&j,&j,&j,&j);
  47.     v_opnvwk(WorkIn,&Handle,WorkOut);
  48.     q_extnd(1,ExtWorkOut);
  49.  
  50.     mfdb.fd_addr=0;  // 0=std, right?  Or should I use (long)Logbase();
  51.     mfdb.fd_w=Width();
  52.     mfdb.fd_h=Height();
  53.     mfdb.fd_wdwidth=Width()/SHORTBITS;
  54.     mfdb.fd_stand=0;
  55.     mfdb.fd_nplanes=NumberOfPlanes();
  56.     mfdb.fd_r1=0;
  57.     mfdb.fd_r2=0;
  58.     mfdb.fd_r3=0;
  59.     LocalRaster=FALSE;
  60. }
  61.  
  62. VDI::VDI(VDI& v) :
  63.     WorkIn(new int[NWI]),
  64.     WorkOut(new int[NWO]),
  65.     ExtWorkOut(new int[NWO])
  66. {
  67.     int j;
  68.     for (j=0; j<NWI; j++) WorkIn[j]=v.WorkIn[j];
  69.     Handle=v.Handle;
  70.     v_opnvwk(WorkIn,&Handle,WorkOut);
  71.     q_extnd(1,ExtWorkOut);
  72.     mfdb.fd_addr=v.mfdb.fd_addr;
  73.     mfdb.fd_w=Width();
  74.     mfdb.fd_h=Height();
  75.     mfdb.fd_wdwidth=Width()/SHORTBITS;
  76.     mfdb.fd_stand=0;
  77.     mfdb.fd_nplanes=NumberOfPlanes();
  78.     mfdb.fd_r1=0;
  79.     mfdb.fd_r2=0;
  80.     mfdb.fd_r3=0;
  81.     LocalRaster=FALSE;
  82. }
  83.  
  84. VDI::VDI(short* raster) :
  85.     WorkIn(new int[NWI]),
  86.     WorkOut(new int[NWO]),
  87.     ExtWorkOut(new int[NWO])
  88. {
  89.     int j;
  90.     for (j=0; j<NWI; j++) WorkIn[j]=StdWorkIn[j];
  91.     Handle=graf_handle(&j,&j,&j,&j);
  92.     v_opnvwk(WorkIn,&Handle,WorkOut);
  93.     q_extnd(1,ExtWorkOut);
  94.  
  95.     if (raster) {
  96.         mfdb.fd_addr=(long)raster;
  97.         LocalRaster=FALSE;
  98.     } else {
  99.         mfdb.fd_addr=(long)new short[NumberOfPlanes()*Height()*Width()/SHORTBITS];
  100.         LocalRaster=TRUE;
  101.     }
  102.  
  103.     mfdb.fd_w=Width();
  104.     mfdb.fd_h=Height();
  105.     mfdb.fd_wdwidth=Width()/SHORTBITS;
  106.     mfdb.fd_stand=0;
  107.     mfdb.fd_nplanes=NumberOfPlanes();
  108.     mfdb.fd_r1=0;
  109.     mfdb.fd_r2=0;
  110.     mfdb.fd_r3=0;
  111. }
  112.  
  113. VDI::VDI(const char* metafile)
  114. {
  115.     if (vq_vgdos()) {
  116.         // What do I do?
  117.     } else {
  118.         Handle = GDOS_NONE;
  119.     }
  120. }
  121.  
  122. VDI::~VDI()
  123. {
  124.     v_clsvwk(Handle);
  125.     if (LocalRaster) delete (short*)mfdb.fd_addr;
  126. }
  127.  
  128. void VDI::clrwk() { v_clrwk(Handle); }
  129. void VDI::updwk() { v_updwk(Handle); }
  130. int VDI::swr_mode (int mode) { return vswr_mode (Handle, mode); }
  131. void VDI::s_color (int index, int rgb[]) { vs_color (Handle, index, rgb); }
  132. int VDI::sl_type (int style) { return vsl_type (Handle, style); }
  133. void VDI::sl_udsty (int pat) { vsl_udsty (Handle, pat); }
  134. int VDI::sl_width (int width) { return vsl_width (Handle, width); }
  135. int VDI::sl_color (int index) { return vsl_color (Handle, index); }
  136. void VDI::sl_ends (int begstyle, int endstyle) { vsl_ends (Handle, begstyle, endstyle); }
  137. int VDI::sm_type (int symbol) { return vsm_type (Handle, symbol); }
  138. void VDI::sm_height (int height) { vsm_height (Handle, height); }
  139. int VDI::sm_color (int index) { return vsm_color (Handle, index); }
  140. int VDI::st_height (int height, int *charw, int *charh, int *cellw, int *cellh) { return vst_height (Handle, height, charw, charh, cellw, cellh); }
  141. int VDI::st_point (int point, int *charw, int *charh, int *cellw, int *cellh) { return vst_point (Handle, point, charw, charh, cellw, cellh); }
  142. int VDI::st_rotation (int ang) { return vst_rotation (Handle, ang); }
  143. int VDI::st_font (int font) { return vst_font (Handle, font); }
  144. int VDI::st_color (int index) { return vst_color (Handle, index); }
  145. int VDI::st_effects (int effects) { return vst_effects (Handle, effects); }
  146. void VDI::st_alignment (int hin, int vin, int *hout, int *vout) { vst_alignment (Handle, hin, vin, hout, vout); } 
  147. int VDI::sf_interior (int style) { return vsf_interior (Handle, style); }
  148. int VDI::sf_fill (int style) { return vsf_fill (Handle, style); }
  149. int VDI::sf_style (int style) { return vsf_style (Handle, style); }
  150. int VDI::sf_color (int index) { return vsf_color (Handle, index); }
  151. int VDI::sf_perimeter (int vis) { return vsf_perimeter (Handle, vis); }
  152. void VDI::sf_udpat (int pat[], int planes) { vsf_udpat (Handle, pat, planes); }
  153.  
  154. int VDI::st_load_fonts (int select) { return vst_load_fonts (Handle, select); }
  155. void VDI::st_unload_fonts (int select) { vst_unload_fonts (Handle, select); }
  156. void VDI::s_clip (int clip_flag, int pxyarray[]) { vs_clip (Handle, clip_flag, pxyarray); }
  157.  
  158. void VDI::bar (int pxyarray[]) { USEME; v_bar (Handle, pxyarray); }
  159. void VDI::arc (int x, int y, int radius, int begang, int endang) { USEME; v_arc (Handle, x, y, radius, begang, endang); } 
  160. void VDI::pieslice (int x, int y, int radius, int begang, int endang) { USEME; v_pieslice (Handle, x, y, radius, begang, endang); }
  161. void VDI::circle (int x, int y, int radius) { USEME; v_circle (Handle, x, y, radius); }
  162. void VDI::ellarc (int x, int y, int xrad, int yrad, int begang, int endang) { USEME; v_ellarc (Handle, x, y, xrad, yrad, begang, endang); }
  163. void VDI::ellpie (int x, int y, int xrad, int yrad, int begang, int endang) { USEME; v_ellpie (Handle, x, y, xrad, yrad, begang, endang); }
  164. void VDI::ellipse (int x, int y, int xrad, int yrad) { USEME; v_ellipse (Handle, x, y, xrad, yrad); }
  165. void VDI::rbox (int pxyarray[]) { USEME; v_rbox (Handle, pxyarray); }
  166. void VDI::rfbox (int pxyarray[]) { USEME; v_rfbox (Handle, pxyarray); }
  167. void VDI::justified (int x, int y, char *str, int len, int word_space, int char_space) { USEME; v_justified (Handle, x, y, str, len, word_space, char_space); }
  168.  
  169. int VDI::sin_mode  (int dev, int mode) { return vsin_mode  (Handle, dev, mode); }
  170. void VDI::rq_locator (int x, int y, int *xout, int *yout, int *term) { vrq_locator (Handle, x, y, xout, yout, term); }  
  171. int VDI::sm_locator (int x, int y, int *xout, int *yout, int *term) { return vsm_locator (Handle, x, y, xout, yout, term); }
  172.  
  173. void VDI::rq_valuator (int in, int *out, int *term) { vrq_valuator (Handle, in, out, term); }
  174. void VDI::sm_valuator (int in, int *out, int *term, int *status) { vsm_valuator (Handle, in, out, term, status); }
  175. void VDI::rq_choice (int cin, int *cout) { vrq_choice (Handle, cin, cout); }
  176. int VDI::sm_choice (int *choice) { return vsm_choice (Handle, choice); }
  177. void VDI::rq_string (int len, int echo, int echoxy[], char *str) { vrq_string (Handle, len, echo, echoxy, str); }
  178. int VDI::sm_string (int len, int echo, int echoxy[], char *str) { return vsm_string (Handle, len, echo, echoxy, str); }
  179. void VDI::sc_form (int form[]) { vsc_form (Handle, form); }
  180. void VDI::ex_timv (void *time_addr, void **otime_addr, int *time_conv) { vex_timv (Handle, time_addr, otime_addr, time_conv); } 
  181. void VDI::show_c (int reset) { USEME; v_show_c (Handle, reset); }
  182. void VDI::hide_c () { USEME; v_hide_c (Handle); }
  183. void VDI::q_mouse (int *pstatus, int *x, int *y) { vq_mouse (Handle, pstatus, x, y); }
  184. void VDI::ex_butv (void *new_p, void **old) { vex_butv (Handle, new_p, old); }
  185. void VDI::ex_motv (void *new_p, void **old) { vex_motv (Handle, new_p, old); }
  186. void VDI::ex_curv (void *new_p, void **old) { vex_curv (Handle, new_p, old); }
  187. void VDI::q_key_s (int *state) { vq_key_s (Handle, state); }
  188.  
  189. void VDI::q_extnd (int flag, int work_out[]) { vq_extnd (Handle, flag, work_out); }
  190. int VDI::q_color (int index, int flag, int rgb[]) { return vq_color (Handle, index, flag, rgb); }
  191. void VDI::ql_attribute (int atrib[]) { vql_attribute (Handle, atrib); }
  192. void VDI::qm_attributes (int atrib[]) { vqm_attributes (Handle, atrib); }
  193. void VDI::qf_attributes (int atrib[]) { vqf_attributes (Handle, atrib); }
  194. void VDI::qt_attributes (int atrib[]) { vqt_attributes (Handle, atrib); }
  195. void VDI::qt_extent (char *str, int extent[]) { vqt_extent (Handle, str, extent); }
  196. int VDI::qt_width (int chr, int *cw, int *ldelta, int *rdelta) { return vqt_width (Handle, chr, cw, ldelta, rdelta); }
  197. int VDI::qt_name (int element, char *name) { return vqt_name (Handle, element, name); }
  198. void VDI::q_cellarray (int pxyarray[], int row_len, int nrows, int *el_used, int *rows_used, int *status, int color[]) { vq_cellarray (Handle, pxyarray, row_len, nrows, el_used, rows_used, status, color); }  
  199. void VDI::qin_mode (int dev, int *mode) { vqin_mode (Handle, dev, mode); }
  200. void VDI::qt_fontinfo (int *minade, int *maxade, int distances[], int *maxwidth, int effects[]) { vqt_fontinfo (Handle, minade, maxade, distances, maxwidth, effects); }  
  201. void VDI::qt_font_info (int *minade, int *maxade, int distances[], int *maxwidth, int effects[]) { vqt_font_info (Handle, minade, maxade, distances, maxwidth, effects); }  
  202.  
  203. void VDI::pline (int count, int pxyarray[]) { USEME; v_pline (Handle, count, pxyarray); }
  204. void VDI::pmarker (int count, int pxyarray[]) { v_pmarker (Handle, count, pxyarray); }
  205. int VDI::gtext (int x, int y, char *str) { USEME; return v_gtext (Handle, x, y, str); }
  206. void VDI::fillarea (int count, int pxyarray[]) { USEME; v_fillarea (Handle, count, pxyarray); }
  207. void VDI::cellarray (int pxyarray[], int row_length, int elements, int nrows, int write_mode, int colarray[]) { USEME; v_cellarray (Handle, pxyarray, row_length, elements, nrows, write_mode, colarray); }
  208. void VDI::contourfill (int x, int y, int index) { USEME; v_contourfill (Handle, x, y, index); }
  209. void VDI::r_recfl (int pxyarray[]) { vr_recfl (Handle, pxyarray); }
  210.  
  211. void VDI::ro_cpyfm (int mode, int pxyarray[], const MFDB& src, const MFDB& dst) { vro_cpyfm (Handle, mode, pxyarray, &src, &dst); }
  212. void VDI::rt_cpyfm (int mode, int pxyarray[], const MFDB& src, const MFDB& dst, int color[]) { vrt_cpyfm (Handle, mode, pxyarray, &src, &dst, color); }  
  213. void VDI::r_trnfm (const MFDB& src, const MFDB& dst) { vr_trnfm (Handle, &src, &dst); }
  214. void VDI::get_pixel (int x, int y, int *pel, int *indx) { USEME; v_get_pixel (Handle, x, y, pel, indx); } 
  215.  
  216. void VDI::q_chcells (int *n_rows, int *n_cols) { vq_chcells (Handle, n_rows, n_cols); }
  217. void VDI::exit_cur () { USEME; v_exit_cur (Handle); }
  218. void VDI::enter_cur () { USEME; v_enter_cur (Handle); }
  219. void VDI::curup () { USEME; v_curup (Handle); }
  220. void VDI::curdown () { USEME; v_curdown (Handle); }
  221. void VDI::curright () { USEME; v_curright (Handle); }
  222. void VDI::curleft () { USEME; v_curleft (Handle); }
  223. void VDI::curhome () { USEME; v_curhome (Handle); }
  224. void VDI::eeos () { USEME; v_eeos (Handle); }
  225. void VDI::eeol () { USEME; v_eeol (Handle); }
  226. void VDI::s_curaddress (int row, int col) { vs_curaddress (Handle, row, col); }
  227. void VDI::curtext (char *s) { USEME; v_curtext (Handle, s); }
  228. void VDI::rvon () { USEME; v_rvon (Handle); }
  229. void VDI::rvoff () { USEME; v_rvoff (Handle); }
  230. void VDI::q_curaddress (int *cur_row, int *cur_col) { vq_curaddress (Handle, cur_row, cur_col); }
  231. int VDI::q_tabstatus () { return vq_tabstatus (Handle); }
  232. void VDI::hardcopy () { USEME; v_hardcopy (Handle); }
  233. void VDI::dspcur  (int x, int y) { USEME; v_dspcur  (Handle, x, y); }
  234. void VDI::rmcur () { USEME; v_rmcur (Handle); }
  235. void VDI::form_adv () { USEME; v_form_adv (Handle); }
  236. void VDI::output_window (int *pxyarray) { USEME; v_output_window (Handle, pxyarray); }
  237. void VDI::clear_disp_list () { USEME; v_clear_disp_list (Handle); }
  238. void VDI::bit_image (const char *filename, int aspect, int x_scale, int y_scale, int h_align, int v_align, int *pxyarray) { v_bit_image (Handle, filename, aspect, x_scale, y_scale, h_align, v_align, pxyarray); }
  239. void VDI::q_scan (int *g_slice, int *g_page, int *a_slice, int *a_page, int *div_fac) { vq_scan (Handle, g_slice, g_page, a_slice, a_page, div_fac); }
  240. void VDI::alpha_text (const char *string) { USEME; v_alpha_text (Handle, string); }
  241. int VDI::s_palette (int palette) { return vs_palette (Handle, palette); }
  242. void VDI::sound (int frequency, int duration) { USEME; v_sound (Handle, frequency, duration); }
  243. int VDI::s_mute (int action) { return vs_mute (Handle, action); }
  244. void VDI::t_resolution (int xres, int yres, int *xset, int *yset) { vt_resolution (Handle, xres, yres, xset, yset); }
  245. void VDI::t_axis (int xres, int yres, int *xset, int *yset) { vt_axis (Handle, xres, yres, xset, yset); }
  246. void VDI::t_origin (int xorigin, int yorigin) { vt_origin (Handle, xorigin, yorigin); }
  247. void VDI::q_dimensions (int *xdimension, int *ydimension) { vq_dimensions (Handle, xdimension, ydimension); }
  248. void VDI::t_alignment (int dx, int dy) { vt_alignment (Handle, dx, dy); }
  249. void VDI::sp_film (int index, int lightness) { vsp_film (Handle, index, lightness); }
  250. int VDI::qp_filmname (int index, char *name) { return vqp_filmname (Handle, index, name); }
  251. void VDI::sc_expose (int state) { vsc_expose (Handle, state); }
  252. void VDI::meta_extents (int min_x, int min_y, int max_x, int max_y) { USEME; v_meta_extents (Handle, min_x, min_y, max_x, max_y); }
  253. void VDI::write_meta (int num_intin, int *a_intin, int num_ptsin, int *a_ptsin) { USEME; v_write_meta (Handle, num_intin, a_intin, num_ptsin, a_ptsin); }
  254. void VDI::m_pagesize (int pgwidth, int pgheight) { vm_pagesize (Handle, pgwidth, pgheight); }
  255. void VDI::m_coords (int llx, int lly, int urx, int ury) { vm_coords (Handle, llx, lly, urx, ury); }
  256. void VDI::m_filename (const char *filename) { vm_filename (Handle, filename); }
  257. void VDI::escape2000 (int times) { USEME; v_escape2000 (Handle, times); }
  258. unsigned long VDI::q_vgdos () { return vq_vgdos (); }
  259. void VDI::getbitmap_info (int ch, long *advancex, long *advancey, long *xoffset, long *yoffset, int *width, int *height, short **bitmap) { USEME; v_getbitmap_info (Handle, ch,  advancex, advancey, xoffset, yoffset, width, height, bitmap); }
  260. void VDI::qt_f_extent (const char *str, int extent[]) { vqt_f_extent (Handle, str, extent); }
  261. void VDI::ftext (int x, int y, const char *str) { USEME; v_ftext (Handle, x, y, str); }
  262. //void VDI::killoutline (void *component) { USEME; v_killoutline (Handle, component); }
  263. void VDI::getoutline (int ch, int *xyarray, char *bezarray, int maxverts, int *numverts) { USEME; v_getoutline (Handle, ch, xyarray, bezarray, maxverts, numverts); }
  264. void VDI::st_scratch (int mode) { vst_scratch (Handle, mode); }
  265. void VDI::st_error (int mode, int *errorvar) { vst_error (Handle, mode, errorvar); }
  266. int VDI::st_arbpt (int point, int *wchar, int *hchar, int *wcell, int *hcell ) { return vst_arbpt (Handle, point, wchar, hchar, wcell, hcell ); }
  267. void VDI::qt_advance (int ch, int *xadv, int *yadv, int *xrem, int *yrem) { vqt_advance (Handle, ch, xadv, yadv, xrem, yrem); } 
  268. void VDI::qt_devinfo (int device, int *isdev, char *drivername ) { vqt_devinfo (Handle, device, isdev, drivername ); }
  269. int VDI::savecache (char *filename ) { return v_savecache (Handle, filename ); }
  270. int VDI::loadcache (char *filename, int mode ) { return v_loadcache (Handle, filename, mode ); }
  271. int VDI::flushcache () { return v_flushcache (Handle); }
  272. int VDI::st_setsize (int point, int *wchar, int *hchar, int *wcell, int *hcell ) { return vst_setsize (Handle, point, wchar, hchar, wcell, hcell ); }
  273. int VDI::st_skew (int skew ) { return vst_skew (Handle, skew ); }
  274. // void VDI::qt_get_tables (void **gascii, void **style ) { vqt_get_tables (Handle, gascii, style ); }
  275. void VDI::qt_get_table (short **map) { vqt_get_table (Handle, map ); }
  276. void VDI::qt_cachesize (int which_cache, size_t *size ) { vqt_cachesize (Handle, which_cache, size ); }
  277. int VDI::bez (int count, int *xyarr, char *bezarr, int extent[4], int *npts, int *nmvs) { USEME; return v_bez (Handle, count, xyarr, bezarr, extent, npts, nmvs); }
  278. int VDI::bez_fill (int count, int *xyarr, char *bezarr, int extent[4], int *npts, int *nmvs) { USEME; return v_bez_fill (Handle, count, xyarr, bezarr, extent, npts, nmvs); }
  279. int VDI::bez_qual (int percent, int *actual) { USEME; return v_bez_qual (Handle, percent, actual); }
  280. int VDI::bez_on () { return v_bez_on (Handle); }
  281. void VDI::bez_off () { v_bez_off (Handle); }
  282.  
  283. void VDI::shtext (int wsid, int x, int y, const char *text, int color, int xshadow, int yshadow ) { USEME; v_shtext (wsid, x, y, text, color, xshadow, yshadow ); }
  284. void VDI::set_app_buff (void **buf_p, int size) { v_set_app_buff (buf_p, size); }
  285.  
  286. // Shorthands...
  287. int  VDI::st_height(int height)
  288. {
  289.     int j;
  290.     return st_height(height,&j,&j,&j,&j);
  291. }
  292.  
  293. int     VDI::st_point(int point)
  294. {
  295.     int j;
  296.     return st_point(point,&j,&j,&j,&j);
  297. }
  298.  
  299. void VDI::st_alignment(int hin, int vin)
  300. {
  301.     st_alignment(hin,vin,&hin,&vin);
  302. }
  303.  
  304.  
  305. void VDI::clip()
  306. {
  307.     int j[]={0,0,MaxX(),MaxY()};
  308.     s_clip(1,j);
  309. }
  310.  
  311. void VDI::clip(int x1, int y1, int x2, int y2)
  312. {
  313.     int j[]={x1,y1,x2,y2};
  314.     s_clip(1,j);
  315. }
  316.  
  317. void VDI::clip_off()
  318. {
  319.     static int j[]={0,0,0,0};
  320.     s_clip(0,j);
  321. }
  322.  
  323.  
  324. void VDI::bar(int x1, int y1, int x2, int y2)
  325. {
  326.     int pxy[]={x1,y1,x2,y2};
  327.     bar(pxy);
  328. }
  329.  
  330. void VDI::rbox(int x1, int y1, int x2, int y2)
  331. {
  332.     int pxy[]={x1,y1,x2,y2};
  333.     rbox(pxy);
  334. }
  335.  
  336. void VDI::rfbox(int x1, int y1, int x2, int y2)
  337. {
  338.     int pxy[]={x1,y1,x2,y2};
  339.     rfbox(pxy);
  340. }
  341.  
  342. void VDI::line(int x1, int y1, int x2, int y2)
  343. {
  344.     int pxy[]={x1,y1,x2,y2};
  345.     pline(2,pxy);
  346. }
  347.  
  348. void VDI::marker(int x, int y)
  349. {
  350.     int pxy[]={x,y};
  351.     pmarker(1,pxy);
  352. }
  353.  
  354. void VDI::r_recfl(int x1, int y1, int x2, int y2)
  355. {
  356.     int pxy[]={x1,y1,x2,y2};
  357.     r_recfl(pxy);
  358. }
  359.  
  360.  
  361. void VDI::ro_cpyfm (int mode, int pxyarray[], VDI& from)
  362. {
  363.     ro_cpyfm(mode,pxyarray,from.mfdb,mfdb);
  364. }
  365.  
  366. void VDI::rt_cpyfm (int mode, int pxyarray[], VDI& from, int color[])
  367. {
  368.     rt_cpyfm(mode,pxyarray,from.mfdb,mfdb,color);
  369. }
  370.   
  371. void VDI::r_trnfm (VDI& from)
  372. {
  373.     r_trnfm(from.mfdb,mfdb);
  374. }
  375.  
  376. void VDI::ro_cpyfm(int mode, int pxyarray[])
  377. {
  378.     ro_cpyfm(mode,pxyarray,mfdb,mfdb);
  379. }
  380.  
  381. void VDI::rt_cpyfm(int mode, int pxyarray[], int color[])
  382. {
  383.     rt_cpyfm(mode,pxyarray,mfdb,mfdb,color);
  384. }
  385.  
  386. void VDI::r_trnfm()
  387. {
  388.     r_trnfm(mfdb,mfdb);
  389. }
  390.  
  391.  
  392. int VDI::Charwidth()
  393. {
  394.     int settings[10];
  395.  
  396.     qt_attributes(settings);
  397.     
  398.     return settings[6];
  399. }
  400.  
  401. int VDI::Charheight()
  402. {
  403.     int settings[10];
  404.     
  405.     qt_attributes(settings);
  406.  
  407.     return settings[7];
  408. }
  409.  
  410. int VDI::Charcellwidth()
  411. {
  412.     int settings[10];
  413.  
  414.     qt_attributes(settings);
  415.     
  416.     return settings[8];
  417. }
  418.  
  419. int VDI::Charcellheight()
  420. {
  421.     int settings[10];
  422.     
  423.     qt_attributes(settings);
  424.     
  425.     return settings[9];
  426. }
  427.