home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18352 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.6 KB

  1. Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!NewsWatcher!user
  2. From: werner@soe.berkeley.edu (John Werner)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Toolbox for elegant, multi-bitdepth Update handling?
  5. Followup-To: comp.sys.mac.programmer
  6. Date: 13 Nov 1992 01:05:01 GMT
  7. Organization: UC Berkeley School of Education
  8. Lines: 21
  9. Distribution: world
  10. Message-ID: <werner-121192170157@128.32.157.31>
  11. References: <1992Nov13.003200.8020@leland.Stanford.EDU>
  12. NNTP-Posting-Host: 128.32.157.31
  13.  
  14. In article <1992Nov13.003200.8020@leland.Stanford.EDU>,
  15. felciano@summit.stanford.edu (Ramon M. Felciano) wrote:
  16. > screen, so I'd like it to be a shade of gray (pattern). How do I handle
  17. > this for windows that span several screens? It seems like I'll have to
  18. > loop through each device, and if any part of the window overlaps there,
  19. > I'll need to draw _that rectangle_ in that screen at the correct bit
  20. > depth. Ugh!
  21.  
  22. This is what you need to do, but it's really not that hard.  There's a
  23. toolbox routine called DeviceLoop that does most of the work for you.  You
  24. pass it a pointer to a function that it calls for each device that overlaps
  25. your window area.  The function can easily figure out the device bit depth
  26. and color/bw setting.
  27.  
  28. Take a look at the "MyDeviceLoop" snippet from DTS (in the
  29. "Graphics&Printing:QuickDraw" folder).  If you're using MacApp I have a
  30. not-quite-finished TDeviceLoopView class you can use.
  31.  
  32. --
  33. John Werner                         werner@soe.berkeley.edu
  34. UC Berkeley School of Education     510-642-9651
  35.