[−][src]Trait resvg::RectExt
Additional Rect methods.
Required methods
fn new_bbox() -> Self
Creates a new Rect for bounding box calculation.
Shorthand for Rect::new(f64::MAX, f64::MAX, 1.0, 1.0).
fn expand(&mut self, r: Rect)
Expands the Rect to the provided size.
fn bbox_transform(&self, bbox: Rect) -> Option<Self>
Transforms the Rect using the provided bbox.
fn transform(&self, ts: &Transform) -> Self
Transforms the Rect using the provided Transform.
This method is expensive.
fn to_screen_size(&self) -> ScreenSize
Returns rect's size in screen units.
fn to_screen_rect(&self) -> ScreenRect
Returns rect in screen units.