Re: rotation of graphics

Scott Raney (raney@metacard.com)
Tue, 18 Feb 1997 10:38:11 -0700 (MST)

On Tue, 18 Feb 1997, Lisa Chuah wrote:

> I am just trying to find out what the easiest way to rotate a rectangular
> graphic (around its center in varying degrees) in metacard while maintaining
> the same graphic (i.e without it getting resized or distorted). Thanks.

You'll need to set the "points" property of a polygon style graphic to
do this. You'd calculate the vertex locations for the 5 points (the
last is the same as the first) based on the angle of rotation using a
little trigonometry. I'll leave the details as an exercise for the
reader, but any computer graphics book will have the magic
incantation.
Scott

> Lisa Chuah
>
> *****************************************************
> * Lisa Chuah *
> * Psychology Department *
> * University of Western Australia *
> * Nedlands 6907 *
> * Western Australia *
> * Ph: (09) 380 1420 / (09) 380 3862 *
> * Fax: (09) 380 1006 *
> * WWW: http://www.psy.uwa.edu.au/user/lisa/lisa.htm *
> *****************************************************
>

***************************************************************
Scott Raney raney@metacard.com http://www.metacard.com
Tcl and ksh: syntactic gymnastics
MetaCard: it does what you think