Struct relm4::drawing::DrawHandler
source · [−]pub struct DrawHandler { /* private fields */ }
Expand description
Manager for drawing operations.
Implementations
sourceimpl DrawHandler
impl DrawHandler
sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Create a new DrawHandler
.
sourcepub fn get_context(&mut self) -> Result<DrawContext, Error>
pub fn get_context(&mut self) -> Result<DrawContext, Error>
Get the drawing context to draw on a gtk::DrawingArea
.
If the size of the gtk::DrawingArea
changed, the contents of the
surface will be replaced by a new, empty surface.
sourcepub fn init(&mut self, draw_area: &DrawingArea)
pub fn init(&mut self, draw_area: &DrawingArea)
Initialize the draw handler.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DrawHandler
impl !Send for DrawHandler
impl !Sync for DrawHandler
impl Unpin for DrawHandler
impl !UnwindSafe for DrawHandler
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