pub struct Plotters {
pub handle: ControlHandle,
/* private fields */
}
Expand description
A canvas-like control that act as a backend for the plotters library. The plotters control use direct2D to render to the canvas.
Fields§
§handle: ControlHandle
Implementations§
Source§impl Plotters
impl Plotters
pub fn builder() -> PlottersBuilder
Sourcepub fn draw<'a>(&'a self) -> Result<PlottersDrawingArea<'a>, PlottersError>
pub fn draw<'a>(&'a self) -> Result<PlottersDrawingArea<'a>, PlottersError>
Prepare the plotters canvas for drawing. Returns an object that can be DrawingArea. This method may fail if an internal error occured during the last draw call
Sourcepub fn enabled(&self) -> bool
pub fn enabled(&self) -> bool
Return true if the control user can interact with the control, return false otherwise
Sourcepub fn set_enabled(&self, v: bool)
pub fn set_enabled(&self, v: bool)
Enable or disable the control
Sourcepub fn visible(&self) -> bool
pub fn visible(&self) -> bool
Return true if the control is visible to the user. Will return true even if the control is outside of the parent client view (ex: at the position (10000, 10000))
Sourcepub fn set_visible(&self, v: bool)
pub fn set_visible(&self, v: bool)
Show or hide the control to the user
Sourcepub fn physical_size(&self) -> (u32, u32)
pub fn physical_size(&self) -> (u32, u32)
Return the physical size of canvas in pixels considering the dpi scale
Sourcepub fn set_position(&self, x: i32, y: i32)
pub fn set_position(&self, x: i32, y: i32)
Set the position of the button in the parent window
Sourcepub fn class_name(&self) -> &'static str
pub fn class_name(&self) -> &'static str
Winapi class name used during control creation
pub fn flags(&self) -> u32
Sourcepub fn forced_flags(&self) -> u32
pub fn forced_flags(&self) -> u32
Winapi flags required by the control