home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- 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
- From: sold@kit.uni-kl.de (Christoph Sold)
- Subject: RE: Scrolling (was:what remains when the clothes fly off?)
- Message-ID: <sold.74.714428884@kit.uni-kl.de>
- Keywords: ScrollRect()
- Lines: 66
- Sender: news@rhrk.uni-kl.de
- Organization: Universitaet Kaiserslautern
- References: <171f6mINN2g1@darkstar.UCSC.EDU>
- Date: Fri, 21 Aug 1992 20:28:04 GMT
- Lines: 66
-
- In article <171f6mINN2g1@darkstar.UCSC.EDU> gil@cse.ucsc.edu (Elmer Fudd) writes:
- >Subject: what remains when the clothes fly off?
- >From: gil@cse.ucsc.edu (Elmer Fudd)
- >Date: 21 Aug 92 01:00:06 GMT
- >Keywords: ScrollRect()
- >
- >Howdi net,
- >
- >i am trying to uncover pictures, and get`something more intersting
- >to be unravelled underneeth then just plain ol' nothing...
- >
- >i am using the routine ScrollRect() to move a boring picture to the
- >side, undeeeth it, i hope to reveal a surprize. but so far all i get
- >is the default background pattern. any experienced scrollers out there?
- >i sure could use some advise now
- >
- >thanks
- >-gil (gil@yahi.ucsc.edu)
-
- Gil,
- this is what ScrollRect is supposed to do. It gets what is on the screen,
- moves it the way you specified, and fills the now free room the pict was
- before with the backgorund pattern. Just have a look at Inside Macintosh Vol
- I, the QuickDraw chapter (How many times a day do I write "Just have a look
- at IM.." ? I think anyone posting here is able to read? :-) )
- To put it the short way:
-
- First, draw a picture:
- +--------------+
- | |
- | O -- |
- | | |
- | \ / |
- | ~~~~ |
- +--------------+
- Second, ScrollRect it to the right:
- +--------------+
- |XXX |
- |XXX O -- |
- |XXX | |
- |XXX \ / |
- |XXX ~~~~ |
- +--------------+
- Now, the area marked with Xes shows the background pattern. Thus,
- third, call InvalRect for the invalid area (marked with X) and wait for the
- update event telling you to update your picture. (alternatively, redraw the
- picture immediately, using the new coordinates.)
- +--------------+
- | |
- | O -- |
- | | |
- | \ / |
- | ~~U~ |
- +--------------+
-
- Warning! This is the last advice you will get without ZOTing you.
- You owe the oracle some graphic keyboard.
-
- -Christoph
-
- Christoph P. Sold CATS Software GmbH
- Mussbacher Landstr.2
- W-6730 Neustadt (Weinstrasse)
- ger.xse0035@applelink.apple.com Germany
-
- "If an apple is fun, what the heck is an appletree?"
-