pub struct PixelCanvasState { /* private fields */ }Implementations§
Source§impl PixelCanvasState
impl PixelCanvasState
pub fn new() -> PixelCanvasState
pub fn brush_color(&self) -> Color
pub fn tool(&self) -> PixelCanvasTool
pub fn set_tool(&self, tool: PixelCanvasTool)
pub fn request_undo(&self)
pub fn request_redo(&self)
pub fn request_fit_view(&self)
pub fn request_actual_size_view(&self)
pub fn request_zoom_in(&self)
pub fn request_zoom_out(&self)
pub fn request_export_snapshot(&self)
pub fn request_clear(&self)
pub fn is_editable(&self) -> bool
pub fn set_editable(&self, editable: bool) -> bool
pub fn latest_export_snapshot(&self) -> Option<PixelCanvasExportSnapshot>
pub fn can_undo(&self) -> bool
pub fn can_redo(&self) -> bool
pub fn can_clear(&self) -> bool
pub fn viewport(&self) -> CanvasViewport
pub fn viewport_size(&self) -> Size
pub fn cursor_position(&self) -> Option<Point>
pub fn set_brush_color(&self, color: Color)
pub fn brush_size(&self) -> f32
pub fn set_brush_size(&self, size: f32)
pub fn brush_opacity(&self) -> f32
pub fn set_brush_opacity(&self, opacity: f32)
pub fn brush_shape(&self) -> PixelCanvasBrushShape
pub fn set_brush_shape(&self, brush_shape: PixelCanvasBrushShape)
pub fn blend_mode(&self) -> PixelCanvasBlendMode
pub fn set_blend_mode(&self, blend_mode: PixelCanvasBlendMode)
pub fn display_visible(&self) -> bool
pub fn set_display_visible(&self, visible: bool) -> bool
pub fn display_opacity(&self) -> f32
pub fn set_display_opacity(&self, opacity: f32) -> bool
pub fn display_blend_mode(&self) -> PixelCanvasBlendMode
pub fn set_display_blend_mode(&self, blend_mode: PixelCanvasBlendMode) -> bool
pub fn display_above_paper(&self) -> bool
pub fn set_display_above_paper(&self, above: bool) -> bool
pub fn paper_visible(&self) -> bool
pub fn set_paper_visible(&self, visible: bool) -> bool
pub fn paper_opacity(&self) -> f32
pub fn set_paper_opacity(&self, opacity: f32) -> bool
Trait Implementations§
Source§impl Clone for PixelCanvasState
impl Clone for PixelCanvasState
Source§fn clone(&self) -> PixelCanvasState
fn clone(&self) -> PixelCanvasState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PixelCanvasState
impl Debug for PixelCanvasState
Source§impl Default for PixelCanvasState
impl Default for PixelCanvasState
Source§fn default() -> PixelCanvasState
fn default() -> PixelCanvasState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PixelCanvasState
impl !Send for PixelCanvasState
impl !Sync for PixelCanvasState
impl !UnwindSafe for PixelCanvasState
impl Freeze for PixelCanvasState
impl Unpin for PixelCanvasState
impl UnsafeUnpin for PixelCanvasState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.