[net.micro.amiga] Printing SuperBitMap

carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) (07/08/86)

   
   I just sent a SuperBitMap drawing-scrolling-printing example to
the mod.sources.amiga moderator.  Meanwhile, here is a useful fragnment
from the program.  This code syncs (updates) the SuperBitmap so that
it can be printed or saved.  It also creates a dummy RastPort structure
which allows the entire SuperBitmap to be dumped to the printer.
   

   /*  Code fragment --- Syncs SuperBitMap for printing, saving */
   /*        rp is window->RPort (SuperBitMap window)           */
   /*        All functions are graphics.library functions       */
   /*        Pass &dRastPort when dumping SuperBitMap           */

   struct RastPort dRastPort;

   /* Lock the Layer                            */
   /* Update the SuperBitmap                    */
   /* Copy window's Rastport structure to dummy */
   /* Insert ptr to our SuperBitmap             */

   /* NULL the Layer pointer                    */
   /* Unlock the Layer                          */
   LockLayerRom(rp->Layer);
   SyncSBitMap(rp->Layer);
   dRastPort = *rp;
   dRastPort.BitMap = rp->Layer->SuperBitMap;
   dRastPort.Layer  = NULL;
   UnlockLayerRom(rp->Layer);


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=