home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14344 < prev    next >
Encoding:
Text File  |  1992-08-21  |  2.7 KB  |  80 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!math.fu-berlin.de!zrz.tu-berlin.de!cs.tu-berlin.de!fauern!ira.uka.de!rz.uni-karlsruhe.de!stepsun.uni-kl.de!oinone.kit.uni-kl.de!sold
  3. From: sold@kit.uni-kl.de (Christoph Sold)
  4. Subject: RE: Scrolling (was:what remains when the clothes fly off?)
  5. Message-ID: <sold.74.714428884@kit.uni-kl.de>
  6. Keywords: ScrollRect()
  7. Lines: 66
  8. Sender: news@rhrk.uni-kl.de
  9. Organization: Universitaet Kaiserslautern
  10. References: <171f6mINN2g1@darkstar.UCSC.EDU>
  11. Date: Fri, 21 Aug 1992 20:28:04 GMT
  12. Lines: 66
  13.  
  14. In article <171f6mINN2g1@darkstar.UCSC.EDU> gil@cse.ucsc.edu (Elmer Fudd) writes:
  15. >Subject: what remains when the clothes fly off?
  16. >From: gil@cse.ucsc.edu (Elmer Fudd)
  17. >Date: 21 Aug 92 01:00:06 GMT
  18. >Keywords: ScrollRect()
  19. >
  20. >Howdi net,
  21. >
  22. >i am trying to uncover pictures, and get`something more intersting
  23. >to be unravelled underneeth then just plain ol' nothing...
  24. >
  25. >i am using the routine ScrollRect() to move a boring picture to the
  26. >side, undeeeth it, i hope to reveal a surprize.  but so far all i get
  27. >is the default background pattern.  any experienced scrollers out there?
  28. >i sure could use some advise now
  29. >
  30. >thanks
  31. >-gil  (gil@yahi.ucsc.edu)
  32.  
  33. Gil,
  34. this is what ScrollRect is supposed to do. It gets what is on the screen, 
  35. moves it the way you specified, and fills the now free room the pict was 
  36. before with the backgorund pattern. Just have a look at Inside Macintosh Vol 
  37. I, the QuickDraw chapter (How many times a day do I write "Just have a look 
  38. at IM.." ? I think anyone posting here is able to read? :-) )
  39. To put it the short way:
  40.  
  41. First, draw a picture:
  42.    +--------------+
  43.    |              |
  44.    |     O --     |
  45.    |      |       |
  46.    |    \    /    |
  47.    |     ~~~~     |
  48.    +--------------+
  49. Second, ScrollRect it to the right:
  50.    +--------------+
  51.    |XXX           |
  52.    |XXX     O --  |
  53.    |XXX      |    |
  54.    |XXX    \    / |
  55.    |XXX     ~~~~  |
  56.    +--------------+
  57. Now, the area marked with Xes shows the background pattern. Thus,
  58. third, call InvalRect for the invalid area (marked with X) and wait for the 
  59. update event telling you to update your picture. (alternatively, redraw the 
  60. picture immediately, using the new coordinates.)
  61.    +--------------+
  62.    |              |
  63.    |        O --  |
  64.    |         |    |
  65.    |       \    / |
  66.    |        ~~U~  |
  67.    +--------------+
  68.  
  69. Warning! This is the last advice you will get without ZOTing you.
  70. You owe the oracle some graphic keyboard.
  71.  
  72. -Christoph
  73.  
  74. Christoph P. Sold                   CATS Software GmbH
  75.                                     Mussbacher Landstr.2
  76.                                     W-6730 Neustadt (Weinstrasse)
  77. ger.xse0035@applelink.apple.com     Germany
  78.  
  79. "If an apple is fun, what the heck is an appletree?"
  80.