Search the web
Sign In
New User? Sign Up
svg-developers · SVG Developers

Group Information

  • Members: 5414
  • Category: Data Formats
  • Founded: Aug 16, 1999
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
Scaling from center point of element   Message List  
Reply Message #65516 of 65551 |
Re: Scaling from center point of element



--- In svg-developers@yahoogroups.com, "gjella" <gjella@...> wrote:
>
> Hi!
>
> I'm having trouble scaling a g-tag from center point. The item will grow
right/bottom, but I need to scale the element from its center point, growing in
all directions.
>
> I'm using the animateTransform for scaling:
> <animateTransform attributeName="transform" attributeType="XML" type="scale"
from="1" to="1.5" dur="3s" fill="freeze"/>
>
> I've read scaling from center point is not supported in SVG, but I refuse to
believe this is true. Up to now I have compensated the bottom/right positioning
with an additional translate-animation, but this is nasty :/.
>
> Anyone done this?
>





Fri Jan 27, 2012 6:26 pm

cremnosedum
Offline Offline
Send Email Send Email

Message #65516 of 65551 |
Expand Messages Author Sort by Date

Hi! I'm having trouble scaling a g-tag from center point. The item will grow right/bottom, but I need to scale the element from its center point, growing in...
gjella Offline Send Email Jan 25, 2012
1:17 am

As often as I've seen this question in the past n years (for some n > k) I'd have to resurrect the suggestion that scaling and rotation relative to the center...
David Dailey
ddailey@... Send Email
Jan 25, 2012
2:11 am

... Yep, and the plan to enable this is for SVG2 to follow the combined SVG/CSS Transforms spec, where transform will become a property (instead of an...
Cameron McCormack
heycam_yg Offline Send Email
Jan 25, 2012
2:19 am

Oh good! The center of mass (centroid or first central moment) is also a graphically relevant construct, so we should think about that too! It’s easily...
David Dailey
ddailey@... Send Email
Jan 25, 2012
2:56 am

... Yeah, I should've said that the percentages in transform-origin will be the bounding box of the object. (There is still the issue of *which* bounding box...
Cameron McCormack
heycam_yg Offline Send Email
Jan 25, 2012
3:01 am

... Another problem I see is that during the animation the center of the bounding box may constantly be shifting. ...
th_w@...
th_w@ymail.com Offline Send Email
Jan 25, 2012
7:11 am

... Sorry, there must be something wrong here. In Firefox, the red circle is shifting around as I expected, but not in Opera and Chromium....
th_w@...
th_w@ymail.com Offline Send Email
Jan 25, 2012
7:16 am

... It looks like a bug in Firefox IMHO. The transformation shouldn't influence the objectBoundingBox of the element. Thats why both circles stay at the same...
dirk_w_schulze Offline Send Email Jan 26, 2012
1:06 am

I didn't see that you take the bounding box of the grouping element at the beginning :P But you are rotating around the central point of the shape, that's why...
dirk_w_schulze Offline Send Email Jan 26, 2012
1:06 am

One of the advantages of the centroid over the center of the bounding box (just a guess) is that the centroid doesn’t change under rotation about a fixed...
David Dailey
ddailey@... Send Email
Jan 26, 2012
12:45 pm

These appear to be bugs in WebKit and Opera. I've annotated the file with a rectangle showing the bounding box of the containing group: ...
Brian Birtles
brianskold Offline Send Email
Jan 26, 2012
11:41 pm
cremnosedum Offline Send Email Jan 27, 2012
6:26 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help