pub struct Tree { /* private fields */ }
Expand description
A nodes tree container.
Implementations§
source§impl Tree
impl Tree
source§impl Tree
impl Tree
sourcepub fn size(&self) -> Size
pub fn size(&self) -> Size
Image size.
Size of an image that should be created to fit the SVG.
width
and height
in SVG.
sourcepub fn node_by_id(&self, id: &str) -> Option<&Node>
pub fn node_by_id(&self, id: &str) -> Option<&Node>
Returns a renderable node by ID.
If an empty ID is provided, than this method will always return None
.
sourcepub fn has_text_nodes(&self) -> bool
pub fn has_text_nodes(&self) -> bool
Checks if the current tree has any text nodes.
sourcepub fn linear_gradients(&self) -> &[Arc<LinearGradient>]
pub fn linear_gradients(&self) -> &[Arc<LinearGradient>]
Returns a list of all unique LinearGradient
s in the tree.
sourcepub fn radial_gradients(&self) -> &[Arc<RadialGradient>]
pub fn radial_gradients(&self) -> &[Arc<RadialGradient>]
Returns a list of all unique RadialGradient
s in the tree.
sourcepub fn clip_paths(&self) -> &[Arc<ClipPath>]
pub fn clip_paths(&self) -> &[Arc<ClipPath>]
Returns a list of all unique ClipPath
s in the tree.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tree
impl !RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl !UnwindSafe for Tree
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)