Skip to content

(usvg) no transform property for Non-Group -> by design? #976

@softmarshmallow

Description

@softmarshmallow

Hi. noticed relative transform does not exist per node, wondering if this is by desig, as the tree will be altered while parsing.

Even if it is, I think we can still have rel transform per node, while that rel transform might not refer to original svg tree's certain parent element, but simply stating relative transform relative to the post-tree parent.

#[derive(Clone, Debug)]
pub struct Path {
    ...
    pub(crate) transform: Transform,
    pub(crate) abs_transform: Transform,
    pub(crate) bounding_box: Rect,
    pub(crate) abs_bounding_box: Rect,
    pub(crate) stroke_bounding_box: Rect,
    pub(crate) abs_stroke_bounding_box: Rect,
}

I can do inverse + multiply, but would be nice to have it from the lib itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions