View Single Post

  #1 (permalink)  
Old 04-23-2005, 01:04 AM
martinarcher martinarcher is offline
Junior Member
 
Join Date: Apr 2005
Posts: 2
Default Rotation problems

Hello all, I am new to SVG and have been working on a project for an interface design class. My project is to design a application that allows the user to tile a plane with shapes. So far my interfave has fthree fixed shapes and the ability to draw your own shape from scratch. I can also delete and copy the shapes as well as move them in a grid if it is turned on. Anyways....

My problem. I have built a buttons into the interface that allow the shapes clicked to be rotated in increments 20 degrees. I have experimented with the matrix(cox(radian), sin(radian),-sin(radian),cos(radian),0,0) and also the rotate(degrees,x,y). Both will roate my shape, but after it has been rotated the coordinate system is also rotated! When I then try to drag the shape, my drag function works with unpredicatable results to say the least. :shock: Different angles cause the movement to be different.

Is there any was to translate the entire coordinate system back the the original non-rotated x/y grid so I can move my shape after it has been rotated??

Any help would be greatly appreciated - this has me stumped, but I am far from an SVG guy! :cry:

Here is the interface - sorry the code is messy, it needs rewritten after I figure out SVG. :lol:

http://marble.sru.edu/~mrb6558/427/SVG/tiler.html
Reply With Quote