Re: [css-transforms][svg11] Effect of perspective and 3D transform on SVG bounding box

On Mon, Oct 14, 2013 at 4:58 PM, Dirk Schulze <dschulze@adobe.com> wrote:

> SVG defines the bounding box of an object as follows [1]:
>
> ""
> getBBox(): Returns the tight bounding box in current user space (i.e.,
> after application of the ‘transform’attribute, if any) on the geometry of
> all contained graphics elements
> ""
>
> The question is what is the effect of 3D transforms on the bounding box? I
> assume that there wouldn't be a big difference. It would still be the tight
> bounding box of the contained elements after transformations.
>
> More interesting, what is with a perspective projection matrix? Would it
> affect the bounding box as well? After all, the perspective projection
> matrix is not very different from a CSS transform which can have
> perspective values as well. Therefore, I would assume that all the
> properties: transform, transform-origin, perspective and perspective-origin
> have an effect on the object bounding box.
>

Right, that seems logical to me too.

Unfortunately this creates a problem:
1) Evaluating the 'perspective-origin' of an SVG element requires knowing
its SVG bounding box.
2) Its SVG bounding box depends on the transformations of its children.
3) The transformations of its children depend on the 'perspective-origin'
of the parent.

Any suggestions for resolving this? I don't see any obvious solution :-(.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*

Received on Monday, 14 October 2013 22:26:40 UTC