Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>mprt_open()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
MPRT_OPEN()
   Creates a hidden screen for printing.

   Syntax
         MPRT_OPEN(nXInches,nYInches [,nLargestBlock])

   Arguments
         nXInches    Sets the width of the screen in inches.
         nYInches    Sets the height of the screen in inches.
         OPTIONAL PARAMETERS
         nLargestBlock  Largest memory block for the print image.

   Returns
         nSwaths     Number of swaths to print image.
                         0 invalid size
                        -1 no printer loaded
                        -2 not enough memory

   Description
         MPRT_OPEN() creates a hidden background screen to handle printing.
         After the screen is created, all subsequent drawing and mapping will
         be done to this new screen, invisible to the user. When the
         MPRT_SCRN() function is invoked, this will be the screen printed.
         This screen will be divided into swaths based on the resolution of
         the screen, minimum size of each pass, and the device aspect ratio.
         One swath, or pass, will be printed at a time.

            X_dots
         Min_size = printer head height or greater
         Swath 1----------------------------------------------
            Y_dots
         Swath 2----------------------------------------------
         Swath 3

         nLargestBlock is the largest memory block to start with when
         trying to allocate memory for the background print image. The
         virtual print screen allocates as much memory as possible from the
         available memory starting with the largest possible size and
         allocating less and less until it find a block of memory. This
         could leave very little for subsequent functions. This allows you
         set set the largest block.

   Examples

               Print the current screen:

               _swaths = MPRT_OPEN(700,500)               && Pixels in X plan
               FOR i = 1 TO _swaths
                  MPRT_SWATH(i)                           && Swath # to print
                  FLINE(10,10,500,350)                    && Draw line
                  MPRT_SCRN(M_left*100,M_top*100)         && Print swath
               NEXT i
               MPRT_CLOSE()                               && Free print screen

See Also: MPRT_CLOSE() MPRT_SCRN() MPRT_SWATH() PRT_STAT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson