pub struct CanvasScope { /* private fields */ }Expand description
A Canvas and its builder.
Implementations§
Source§impl CanvasScope
impl CanvasScope
Sourcepub fn view_box(self, width: f32, height: f32) -> Self
pub fn view_box(self, width: f32, height: f32) -> Self
Scales the command list’s coordinates from (width, height) to the Canvas’s
measured width and height. Stroke widths stay in dp.
Sourcepub fn fractional(self) -> Self
pub fn fractional(self) -> Self
Scales the command list’s coordinates as 0.0..=1.0 fractions of the Canvas’s
measured width and height. Stroke widths stay in dp.
Trait Implementations§
Source§impl Drop for CanvasScope
impl Drop for CanvasScope
Auto Trait Implementations§
impl !Send for CanvasScope
impl !Sync for CanvasScope
impl Forget for CanvasScope
impl Freeze for CanvasScope
impl Move for CanvasScope
impl RefUnwindSafe for CanvasScope
impl Unpin for CanvasScope
impl UnsafeUnpin for CanvasScope
impl UnwindSafe for CanvasScope
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