🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #6745

Re: Flopping line in MacPaint (rubberband line)

#6745
From: pvf
Date: Tue, 12 Aug 1986 16:48
33 lines
2199 bytes
The rubberband line effect is easy to get on the ST.  GEM supports
an XOR writing mode, where each graphic that you place on the screen
is automatically XORed with the existing pattern.  As a previous
followup pointed out, this is the way to do the job.

The rubberband line is a simple call to polyline with the XOR writing
mode enabled.  All you have to do is draw the line from the fixed point
to the variable point, under XOR writing mode:

    1) When the variable point selector moves to a point, and,
    2) When the variable point selector moves off that point.

Of course, this means that each line is "drawn" twice.  First, to
make it visible, then again to make it invisible.

I have implemented some input routines that coordinate the mouse with
a rubberband line, and they are surprisingly fast considering that
the rubberband line is drawn twice for each individual point to which
the mouse moves during the operation.

BTW an interesting effect is a multiple rubberband line where there are
several fixed points and a single variable point.  A three point system
is simplest. Just issue a polyline call supplying three points.  The
first and last are the fixed points, the second has the coordinates of
the variable point.

This can easily be expanded to handle the display a closed polygon
with rubberband lines showing where the lines would be if you closed
the polygon at any particular time.

By the way, bad as they may be (in some peoples opinions), all the above
info was found in the ABACUS books and a little thought, so while they
may not be the best, they can help.
Technical Details
Message-ID: <208@bridge2.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!husc6!yale!decvax!decwrl!glacier!bridge2!pvf
References: <2693@mit-hermes.ARPA> <1232@trwrb.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!husc6!yale!decvax!decwrl!glacier!bridge2!pvf
From: pvf@bridge2.UUCP
Newsgroups: net.micro.mac,net.micro.atari16
Subject: Re: Flopping line in MacPaint (rubberband line)
Message-ID: <208@bridge2.UUCP>
Date: Tue, 12-Aug-86 12:48:56 EDT
Article-I.D.: bridge2.208
Posted: Tue Aug 12 12:48:56 1986
Date-Received: Thu, 14-Aug-86 06:03:32 EDT
References: <2693@mit-hermes.ARPA> <1232@trwrb.UUCP>
Distribution: net
Organization: Bridge Communications, Inc., Mountain View, Ca
Lines: 33