Struct mltg::DrawCommand
source · [−]pub struct DrawCommand<'a> { /* private fields */ }
Implementations
sourceimpl<'a> DrawCommand<'a>
impl<'a> DrawCommand<'a>
pub fn clear(&self, color: impl Into<Rgba>)
pub fn fill(&self, object: &impl Fill, brush: &Brush)
pub fn stroke(
&self,
object: &impl Stroke,
brush: &Brush,
width: f32,
style: Option<&StrokeStyle>
)
pub fn draw_text(
&self,
text: &str,
format: &TextFormat,
brush: &Brush,
origin: impl Into<Point>
)
pub fn draw_text_layout(
&self,
layout: &TextLayout,
brush: &Brush,
origin: impl Into<Point>
)
pub fn draw_image(
&self,
image: &Image,
dest_rect: impl Into<Rect>,
src_rect: Option<Rect>,
interpolation: Interpolation
)
pub fn clip(&self, rect: impl Into<Rect>, f: impl FnOnce(&DrawCommand<'_>))
pub fn set_offset(&self, point: impl Into<Point>)
Auto Trait Implementations
impl<'a> RefUnwindSafe for DrawCommand<'a>
impl<'a> !Send for DrawCommand<'a>
impl<'a> !Sync for DrawCommand<'a>
impl<'a> Unpin for DrawCommand<'a>
impl<'a> UnwindSafe for DrawCommand<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more