Rotation about centroid and scaling to shrink in place (without scripting)

Teaching people to use SVG is a bit different than writing a spec I suppose, 
and perhaps, even a bit different than building a browser. Sometimes,  I 
can't help but think we should take lessons from those who try to learn to 
use our things. It may give insights into designing things. I have a friend 
who used to "fix" the airplane cockpits that were too complicated for humans 
to fly. That was after a few of them crashed.

I think it would be nice to have attribute values for rotations like
transform="rotate(45, 'center' )" and transform="rotate(45, 
'center-of-Mass' )" where center is the center of the getBBox() of the 
object being transformed and center-of-Mass is its 2nd central moment
and for scaling like transform="scale(.5, 'center' )" so that the thing 
shrinks relative to its center rather than to 0,0.

One can use script to do it, but suppose we want to enable people to do it 
without script.

Clearly it is just a convenience to avoid having to get out one's scribble 
pad and draw a picture and do the arithmetic. I find that for very simple 
objects I can sometimes do that math in my head but I find a lot of folks 
can't.

For something like
<animateTransform attributeName="transform" type="translate" dur="4s" 
values="0,0;-110,-140;0,0" repeatCount="indefinite"/>
 <animateTransform attributeName="transform" additive="sum" type="scale" 
dur="4s" values="1;1.5;1" repeatCount="indefinite"/>
<animateTransform attributeName="transform" additive="sum" type="rotate" 
dur="7s" values="0,216 242;360 216 242" repeatCount="indefinite"/>
as used in 
http://srufaculty.sru.edu/david.dailey/svg/newstuff/transformRotate1.svgOne 
almost needs to use getBBox in order to know how to proceed with the rather 
complicated polygon involved.CheersDavid 

Received on Saturday, 13 November 2010 21:06:12 UTC