pub struct PathBbox { /* private fields */ }
Expand description
A path bbox representation.
The same as Rect
, but width or height are allowed to be zero
to represent horizontal or vertical lines.
Implementations
sourceimpl PathBbox
impl PathBbox
sourcepub fn new(x: f64, y: f64, width: f64, height: f64) -> Option<Self>
pub fn new(x: f64, y: f64, width: f64, height: f64) -> Option<Self>
Creates a new PathBbox
from values.
sourcepub fn new_bbox() -> Self
pub fn new_bbox() -> Self
Creates a new PathBbox
for bounding box calculation.
Shorthand for PathBbox::new(f64::MAX, f64::MAX, 1.0, 1.0)
.
sourcepub fn bbox_transform(&self, bbox: Rect) -> Self
pub fn bbox_transform(&self, bbox: Rect) -> Self
Transforms the PathBbox
using the provided bbox
.
Trait Implementations
impl Copy for PathBbox
Auto Trait Implementations
impl RefUnwindSafe for PathBbox
impl Send for PathBbox
impl Sync for PathBbox
impl Unpin for PathBbox
impl UnwindSafe for PathBbox
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more