•  Back 
  •  VDI Printer Escapes 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-Filevq_scan()
v_bit_image()                                                           VDI

Syntax

VOID v_bit_image( handle, fname, ratio, xscale, yscale, halign, valign,
                  pxy )
WORD handle;
char *fname;
WORD aspect, xscale, yscale, halign, valign;
WORD *pxy;

Function      v_bit_image() outputs a disk-based GEM '.IMG' file.

Opcode        5

Sub-Opcode    23

Availability  Supported by all printer, metafile, and memory drivers.

Parameters    handle is a valid workstation handle. fname specifies the
              GEMDOS file specification for the GEM bit-image file to
              print. ratio should be 0 to ignore the aspect ratio of the
              image and 1 to adhere to it. xscale and yscale specify the
              method of scaling to apply to the image. Fractional scaling
              is specified by a value of 0 whereas a value of 1 represents
              integer scaling. If fractional scaling is used, the image
              will be displayed at the coordinates given by the VDI format
              rectangle pointed to by pxy. If integer scaling is applied,
              the image will be displayed as large as possible within the
              given coordinates using halign and valign to specify the
              image justification as follows:

              Value  halign         valign

                0    Left           Top
                     IMAGE_LEFT     IMAGE_TOP

                1    Center         Center
                     IMAGE_CENTER   IMAGE_CENTER

                2    Right          Bottom
                     IMAGE_RIGHT    IMAGE_BOTTOM

Binding       WORD tmp = 5;

              intin[0] = ratio;
              intin[1] = xscale;
              intin[2] = yscale;
              intin[3] = halign;
              intin[4] = valign;
              while(intin[tmp++] = (WORD)*fname++);

              contrl[0] = 5;
              contrl[1] = 2;
              contrl[3] = --tmp;
              contrl[5] = 23;
              contrl[6] = handle;

              ptsin[0] = pxy[0];
              ptsin[1] = pxy[1];
              ptsin[2] = pxy[2];
              ptsin[3] = pxy[3];

              vdi();

Comments      A flag indicating whether the device supports scaling can be
              found in vq_extnd(). This call used with the memory driver
              can provide image scaling for transfer to the screen with
              vrt_cpyfm().

See Also      vq_scan()

Group         VDI Printer Escapes