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§
source§impl 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
.