pub struct Image { /* private fields */ }
Expand description
A raster image element.
image
element in SVG.
Implementations§
source§impl Image
impl Image
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 visibility(&self) -> Visibility
pub fn visibility(&self) -> Visibility
Element visibility.
sourcepub fn view_box(&self) -> ViewBox
pub fn view_box(&self) -> ViewBox
An image rectangle in which it should be fit.
Combination of the x
, y
, width
, height
and preserveAspectRatio
attributes.
sourcepub fn rendering_mode(&self) -> ImageRendering
pub fn rendering_mode(&self) -> ImageRendering
Rendering mode.
image-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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
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