[comp.sys.mac.programmer] rgn rotation

sonenbli@oxy.edu (Andrew D. Sonenblick) (09/28/90)

We're seeking a quick method of rgn rotation for our animation application.
Currently, we are painting the rgn to a bitmap, rotating the map, then
calling BitMapRgn.  Any better ideas?  We'd like to hear them...

Andrew Sonenblick

jwhitnell@cup.portal.com (Jerry D Whitnell) (09/30/90)

Andrew Sonenblick writes...
|We're seeking a quick method of rgn rotation for our animation application.
|Currently, we are painting the rgn to a bitmap, rotating the map, then
|calling BitMapRgn.  Any better ideas?  We'd like to hear them...

The region format is relativly straight forward.  It is basically a set
of "inversion points", where each inversion point causes all bits below and
to the right to be inverted from their current state.  So rotating to
multiples of 90 degrees should be straight-forward.  Rotating to an
arbitrary angle is more difficult since you have to essentially do a polygon
fill and convert back to the region format.

If you need more information on the region format, let me know and I'll
write a short note on it.

Jerry Whitnell
SuperMac Technology

jason@ux1.cso.uiuc.edu (char *myName) (09/30/90)

jwhitnell@cup.portal.com (Jerry D Whitnell) writes:

>The region format is relativly straight forward.  It is basically a set
>of "inversion points", where each inversion point causes all bits below and
>to the right to be inverted from their current state.  So rotating to
>multiples of 90 degrees should be straight-forward.  Rotating to an
>arbitrary angle is more difficult since you have to essentially do a polygon
>fill and convert back to the region format.

>If you need more information on the region format, let me know and I'll
>write a short note on it.

>Jerry Whitnell
>SuperMac Technology

Yes!  I would love to know more.

-- 

                       |  |    |====================|
                       |  |    | Jason Watts        |
                     \ |\ |\ \ | (jazzin@uiuc.edu)  |

francis@arthur.uchicago.edu (Francis Stracke) (10/01/90)

In article <111972@tiger.oxy.edu> sonenbli@oxy.edu (Andrew D. Sonenblick) writes:
>We're seeking a quick method of rgn rotation for our animation application.
>Currently, we are painting the rgn to a bitmap, rotating the map, then
>calling BitMapRgn.  Any better ideas?  We'd like to hear them...
Is the internal format of a rgn published anywhere (like the picture is)?
If so, you could decode it, & replace the coordinates with their rotated
equivalents.

| Francis Stracke		| My opinions are my own.  I don't steal them.|
| Department of Mathematics	|=============================================|
| University of Chicago		| A mathematician is a professional	      |
| francis@zaphod.uchicago.edu	|   schizophrenic.--Me.		       	      |