home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff239.lzh / JGoodies / Mandelbrot / bitmap_support < prev    next >
Text File  |  1989-08-21  |  1KB  |  44 lines

  1. \ Copyright 1989 NerveWare
  2. \ No portion of this code may used for commercial purposes,
  3. \ nor may any executable version of this code be disributed for 
  4. \ commercial purposes without the author's express written permission.
  5. \ This code is shareware, all rights reserved.
  6. \ Nick Didkovsky 
  7. \ MOD: $iff>bitmap needed a NOT in it.  see below.            ND 2/3/89
  8.  
  9. getmodule includes
  10.  
  11. include? $ilbm.parse.file jiff:ilbm_parser
  12.  
  13. anew task-Test_bitmap
  14.  
  15. \ **************************** BITMAP STUFF ******************************
  16.  
  17. \ borrowed from Phil Burk's beta IFF stuff.  Display a bitmap at x,y
  18.  
  19. variable cur-minterm
  20. $ 0C0 cur-minterm !
  21.  
  22. : XYBITMAP { xd yd bmap -- , draw bitmap to rastport}
  23.     bmap 0 0 ( absbitmap x y )
  24.     gr-currport @ >rel xd yd ( absrastport x y )
  25.     bmap bitmap>wh
  26.     cur-minterm @
  27.     BltBitMapRastPort()
  28. ;
  29.  
  30. \ MOD: NOT was missing below.  Always returned 0 instead of bitmap address.
  31.  
  32. : $IFF>BITMAP.ND ( $filename -- bitmap | NULL , read )
  33.     gr.init
  34. \ Read graphics from file.
  35.     $ilbm.parse.file
  36.     ilbm.alloc.bitmap dup 
  37.     IF  dup ilbm.fill.bitmap
  38.         NOT IF free.bitmap 0
  39.         THEN
  40.     THEN
  41.     ilbm.cleanup
  42. ;
  43.  
  44.