Struct relm4::drawing::DrawHandler
source · pub struct DrawHandler { /* private fields */ }
Expand description
Manager for drawing operations.
Implementations§
source§impl DrawHandler
impl DrawHandler
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new DrawHandler
.
sourcepub fn new_with_drawing_area(drawing_area: DrawingArea) -> Self
pub fn new_with_drawing_area(drawing_area: DrawingArea) -> Self
Create a new DrawHandler
with an existing gtk::DrawingArea
.
sourcepub fn get_context(&mut self) -> DrawContext
pub fn get_context(&mut self) -> DrawContext
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 height(&self) -> i32
pub fn height(&self) -> i32
Get the height of the DrawHandler
.
sourcepub fn width(&self) -> i32
pub fn width(&self) -> i32
Get the width of the DrawHandler
.
sourcepub fn drawing_area(&self) -> &DrawingArea
pub fn drawing_area(&self) -> &DrawingArea
Get the gtk::DrawingArea
of the DrawHandler
.