Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!oliveb!pyramid!voder!apple!dowdy From: dowdy@apple.UUCP Newsgroups: comp.sys.mac Subject: Tidbit Post Again Message-ID: <985@apple.UUCP> Date: Wed, 10-Jun-87 17:21:01 EDT Article-I.D.: apple.985 Posted: Wed Jun 10 17:21:01 1987 Date-Received: Sat, 13-Jun-87 05:22:40 EDT Organization: Apple Computer, Inc., Cupertino, USA Lines: 65 Keywords: Mistake Seems I left off a piece of the code. Mustnt have copied it into the clipboard right...Here is the complete program. Sorry all. PROGRAM Marquee; { An example of a MacPaint-like Marquee using 8 patterns} { Note: in reality, this pattern is backwards from the} { real MacPaint one, but that is simple to fix} { Tom Dowdy, Apple Computer} VAR r, r2 : rect; { Rectangles for fill and frame } p : ARRAY[0..7] OF pattern; { Array of the 8 patterns } i, j : integer; { Loop counters } BEGIN { Initial pattern is a simple diagonal line, upper right to lower left} { 11100001 : 0} { 11110000 : 1} { 01111000 : 2} { 00111100 : 3} { 00011110 : 4} { 00001111 : 5} { 10000111 : 6} { 11000011 : 7} p[0][0] := 128 + 64 + 32 + 1; p[0][1] := 128 + 64 + 32 + 16; p[0][2] := 64 + 32 + 16 + 8; p[0][3] := 32 + 16 + 8 + 4; p[0][4] := 16 + 8 + 4 + 2; p[0][5] := 8 + 4 + 2 + 1; p[0][6] := 128 + 4 + 2 + 1; p[0][7] := 128 + 64 + 2 + 1; {We shift each pattern off by one pixel from the previous pattern} FOR i := 1 TO 7 DO BEGIN FOR j := 0 TO 6 DO p[i][j] := p[i - 1][j + 1]; p[i][7] := p[i - 1][0]; END; SetRect(r, 50, 50, 100, 100); SetRect(r2, 120, 50, 170, 100); REPEAT FOR i := 0 TO 7 DO BEGIN PenPat(p[i]); PenMode(notPatBic); PaintRect(r); PenMode(patCopy); FrameOval(r); FrameRect(r2); END; UNTIL 0 = 1; {do forever} END. =========================================================================== Tom Dowdy CSNET: dowdy@apple.CSNET Apple Computer Internet: dowdy@apple.COM 20525 Mariani Ave MoneyNet: (408) 973-6689 Cupertino, CA 95014 AppleLink:DOWDY1 MS: 27Y UUCP: {sun,voder,amdahl,decwrl}!apple!dowdy "Plus ca change, Plus c'est la meme chose." ===========================================================================