qpgraph.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_ImageSize... Functions
  Summary Details Example                                   Back
 
  Arguments
 
    x1, y1        Upper-left corner of bounding rectangle in viewport
                  coordinates
 
    x2, y2        Lower-right corner of bounding rectangle in viewport
                  coordinates
 
    wx1, wy1      Upper-left corner of bounding rectangle in window
                  coordinates
 
    wx2, wy2      Lower-right corner of bounding rectangle in window
                  coordinates
 
    wxy1, wxy2    Window coordinate pairs defining bounding rectangle
 
  Return
 
    LongInt       Number of bytes needed to store the image inside
                  the bounding rectangle specified by the viewport or
                  window coordinates
 
  Description
 
    The _ImageSize functions return the number of bytes needed to store
    the image defined by the bounding rectangle.
 
    Warning:  The size in bytes may exceed 64K. No internal error
    checking is performed, so an attempt to use the _GetImage procedure
    without a sufficiently large buffer may alter the contents of
    memory. Always use _ImageSize before using _GetImage or _PutImage.
 
    The size returned is determined by the following formula:
 
       xwid = Abs( x1 - x2 ) + 1;
       ywid = Abs( y1 - y2 ) + 1;
       size = 4 + (((xwid * bits-per-pixel + 7) / 8) * ywid);
 
    The bits-per-pixel value is returned by the _GetVideoConfig
    procedure in the bits-per-pixel field.
 
  _GrStatus Returns
 
    _GrNotInProperMode