Skip to content

[css-transforms-2][svg11] Effect of perspective and 3D transform on SVG bounding box #907

@smfr

Description

@smfr

https://www.w3.org/mid/B7126E1C-EB7C-4D9F-9238-F9CDD72BDB21@adobe.com

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions