On Fri, 18 Feb 2005 11:11:25 -0800, Joe Van Dyk <joevandyk / gmail.com> wrote:
> On Fri, 18 Feb 2005 10:44:29 -0800, Joe Van Dyk <joevandyk / gmail.com> wrote:
> > I have a GnomeCanvas Group that I'm trying to rotate (in 2D).
> >
> > I know which direction the "top" of the group should be pointing.
> >
> > My initial attempt was
> >         affine = Art::Affine.new([Math.cos(180), -Math.sin(180), 0,
> > Math.sin(180), Math.cos(180), 0])
> >         @group.affine_absolute(affine)
> >
> > That was to rotate the object 180 degrees, but it didn't work too
> > well.  I'm pretty new to all this matrix transformation / graphical
> > stuff.  Could someone tell me if I'm on the right track?
> >
> 
> Nevermind, I got it.  Reading through the C LibArt documentation, the
> affine matrix needs to be in (x1, y1, x2, y2, x3, y3) format, not (x1,
> x2, x3, y1, y2, y3) as I assume.

Well, I thought I had it.

I have an Gnome::CanvasItem that's, say, at position (100, 100).  When
I attempt to use a rotation affine translation, it rotates and moves
the object to some other place.

All I want to do is be able to rotate the item by a certain amount of
degrees in 2D space and have it stay at the same x/y coordinate.

Any ideas?