🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: mod.mac.sources
1 messages
1 total messages Started by Paul DuBois Thu, 10 Jul 1986 13:55
MarqueeRect.c
#3
Author: Paul DuBois
Date: Thu, 10 Jul 1986 13:55
31 lines
1415 bytes
The procedure below can be used to achieve a marquee effect - that is,
the rectangle is framed with a dashed line, where the dashes move.
To use it, set up a rectangle, then call MarqueeRect repeatedly to
achieve the effect of motion.  A generalization to MarqueeRgn for
regions is straightforward.

The procedure is written in LightspeedC.

---
/* include a QuickDraw header file here */

Pattern		marqueePat = { 0x0f, 0x87, 0xc3, 0xe1, 0xf0, 0x78, 0x3c, 0x1e };


MarqueeRect (r)
Rect	*r;
{
PenState	p;
Byte		b;
int			i;

	GetPenState (&p);
	PenPat (marqueePat);
	PenMode (patCopy);
	FrameRect (r);
	SetPenState (&p);
	b = marqueePat[0];		/* shift pattern up for next call */
	for (i = 0; i < 7; ++i)		/* (could shift sideways instead) */
		marqueePat[i] = marqueePat[i+1];
	marqueePat[7] = b;
}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads