pub struct Path { /* private fields */ }
Expand description
A path element.
Implementations§
source§impl Path
impl Path
sourcepub fn id(&self) -> &str
pub fn id(&self) -> &str
Element’s ID.
Taken from the SVG itself. Isn’t automatically generated. Can be empty.
sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Element visibility.
sourcepub fn paint_order(&self) -> PaintOrder
pub fn paint_order(&self) -> PaintOrder
Fill and stroke paint order.
Since markers will be replaced with regular nodes automatically,
usvg
doesn’t provide the markers
order type. It’s was already done.
paint-order
in SVG.
sourcepub fn rendering_mode(&self) -> ShapeRendering
pub fn rendering_mode(&self) -> ShapeRendering
Rendering mode.
shape-rendering
in SVG.
sourcepub fn abs_transform(&self) -> Transform
pub fn abs_transform(&self) -> Transform
Element’s absolute transform.
Contains all ancestors transforms including elements’s transform.
Note that this is not the relative transform present in SVG. The SVG one would be set only on groups.
sourcepub fn bounding_box(&self) -> Rect
pub fn bounding_box(&self) -> Rect
Element’s object bounding box.
objectBoundingBox
in SVG terms. Meaning it doesn’t affected by parent transforms.
sourcepub fn abs_bounding_box(&self) -> Rect
pub fn abs_bounding_box(&self) -> Rect
Element’s bounding box in canvas coordinates.
userSpaceOnUse
in SVG terms.
sourcepub fn stroke_bounding_box(&self) -> Rect
pub fn stroke_bounding_box(&self) -> Rect
Element’s object bounding box including stroke.
Will have the same value as bounding_box
when path has no stroke.
sourcepub fn abs_stroke_bounding_box(&self) -> Rect
pub fn abs_stroke_bounding_box(&self) -> Rect
Element’s bounding box including stroke in canvas coordinates.
Will have the same value as abs_bounding_box
when path has no stroke.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Path
impl !RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl !UnwindSafe for Path
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)