pub struct Frame { /* private fields */ }Available on crate feature
geometry only.Expand description
A frame for drawing some geometry.
Implementations§
Trait Implementations§
Source§impl Backend for Frame
impl Backend for Frame
type Geometry = Geometry
fn width(&self) -> f32
fn height(&self) -> f32
fn size(&self) -> Size
fn center(&self) -> Point
fn fill(&mut self, path: &Path, fill: impl Into<Fill>)
fn fill_rectangle(&mut self, top_left: Point, size: Size, fill: impl Into<Fill>)
fn stroke<'a>(&mut self, path: &Path, stroke: impl Into<Stroke<'a>>)
fn stroke_rectangle<'a>( &mut self, top_left: Point, size: Size, stroke: impl Into<Stroke<'a>>, )
fn stroke_text<'a>( &mut self, text: impl Into<Text>, stroke: impl Into<Stroke<'a>>, )
fn fill_text(&mut self, text: impl Into<Text>)
fn translate(&mut self, translation: Vector)
fn rotate(&mut self, angle: impl Into<Radians>)
fn scale(&mut self, scale: impl Into<f32>)
fn scale_nonuniform(&mut self, scale: impl Into<Vector>)
fn push_transform(&mut self)
fn pop_transform(&mut self)
fn draft(&mut self, clip_bounds: Rectangle) -> Frame
fn paste(&mut self, frame: Frame)
fn into_geometry(self) -> Self::Geometry
fn draw_image(&mut self, bounds: Rectangle, image: impl Into<Image>)
fn draw_svg(&mut self, bounds: Rectangle, svg: impl Into<Svg>)
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more