Trait iced_graphics::geometry::frame::Backend
source · pub trait Backend: Sized {
type Geometry;
Show 17 methods
// Required methods
fn width(&self) -> f32;
fn height(&self) -> f32;
fn size(&self) -> Size;
fn center(&self) -> Point;
fn push_transform(&mut self);
fn pop_transform(&mut self);
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 draft(&mut self, clip_bounds: Rectangle) -> Self;
fn paste(&mut self, frame: Self, at: Point);
fn stroke<'a>(&mut self, path: &Path, stroke: impl Into<Stroke<'a>>);
fn fill(&mut self, path: &Path, fill: impl Into<Fill>);
fn fill_text(&mut self, text: impl Into<Text>);
fn fill_rectangle(
&mut self,
top_left: Point,
size: Size,
fill: impl Into<Fill>
);
fn into_geometry(self) -> Self::Geometry;
}
Available on crate feature
geometry
only.Expand description
Required Associated Types§
Required Methods§
fn width(&self) -> f32
fn height(&self) -> f32
fn size(&self) -> Size
fn center(&self) -> Point
fn push_transform(&mut self)
fn pop_transform(&mut self)
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 draft(&mut self, clip_bounds: Rectangle) -> Self
fn paste(&mut self, frame: Self, at: Point)
fn stroke<'a>(&mut self, path: &Path, stroke: impl Into<Stroke<'a>>)
fn fill(&mut self, path: &Path, fill: impl Into<Fill>)
fn fill_text(&mut self, text: impl Into<Text>)
fn fill_rectangle(&mut self, top_left: Point, size: Size, fill: impl Into<Fill>)
fn into_geometry(self) -> Self::Geometry
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl Backend for ()
Available on debug-assertions enabled only.
impl Backend for ()
Available on debug-assertions enabled only.