[−][src]Trait usvg::NodeExt
Additional Node
methods.
Required methods
pub fn id(&self) -> Ref<'_, str>
[src]
Returns node's ID.
If a current node doesn't support ID - an empty string will be returned.
pub fn transform(&self) -> Transform
[src]
Returns node's transform.
If a current node doesn't support transformation - a default transform will be returned.
pub fn abs_transform(&self) -> Transform
[src]
Returns node's absolute transform.
If a current node doesn't support transformation - a default transform will be returned.
pub fn units(&self) -> Option<Units>
[src]
Returns node's paint server units.
Returns None
when node is not a LinearGradient
, RadialGradient
or Pattern
.
pub fn append_kind(&mut self, kind: NodeKind) -> Node
[src]
Appends kind
as a node child.
Shorthand for Node::append(Node::new(Box::new(kind)))
.
pub fn tree(&self) -> Tree
[src]
Returns a node's tree.
pub fn calculate_bbox(&self) -> Option<Rect>
[src]
Calculates node's absolute bounding box.
Can be expensive on large paths and groups.
pub fn filter_background_start_node(&self, filter: &Filter) -> Option<Node>
[src]
Returns the node starting from which the filter background should be rendered.