pub struct Canvas { /* private fields */ }Implementations§
Source§impl Canvas
impl Canvas
Sourcepub fn set_colors(&mut self, fg: RgbColor, bg: RgbColor)
pub fn set_colors(&mut self, fg: RgbColor, bg: RgbColor)
Sets colors.
Sourcepub fn reset_clip_rect(&self)
pub fn reset_clip_rect(&self)
Performs the reset clip rect operation.
Sourcepub fn fill_rect(&self, x: usize, y: usize, w: usize, h: usize)
pub fn fill_rect(&self, x: usize, y: usize, w: usize, h: usize)
Performs the fill rect operation.
Sourcepub fn fill_rect_alpha(&self, x: usize, y: usize, w: usize, h: usize, alpha: u8)
pub fn fill_rect_alpha(&self, x: usize, y: usize, w: usize, h: usize, alpha: u8)
Performs the fill rect alpha operation.
Sourcepub fn text_opts(
&self,
x: usize,
y: usize,
text: &str,
align: TextAlign,
wrap: bool,
max_width: Option<usize>,
) -> TextMetrics
pub fn text_opts( &self, x: usize, y: usize, text: &str, align: TextAlign, wrap: bool, max_width: Option<usize>, ) -> TextMetrics
Performs the text opts operation.
Sourcepub fn measure_text(
&self,
text: &str,
max_width: Option<usize>,
wrap: bool,
) -> TextMetrics
pub fn measure_text( &self, text: &str, max_width: Option<usize>, wrap: bool, ) -> TextMetrics
Performs the measure text operation.
Sourcepub fn blit_rgb(
&self,
x: usize,
y: usize,
w: usize,
h: usize,
pixels: &[RgbColor],
) -> bool
pub fn blit_rgb( &self, x: usize, y: usize, w: usize, h: usize, pixels: &[RgbColor], ) -> bool
Performs the blit rgb operation.
Sourcepub fn blit_rgb24(
&self,
x: usize,
y: usize,
w: usize,
h: usize,
bytes: &[u8],
) -> bool
pub fn blit_rgb24( &self, x: usize, y: usize, w: usize, h: usize, bytes: &[u8], ) -> bool
Performs the blit rgb24 operation.
Sourcepub fn blit_rgba(
&self,
x: usize,
y: usize,
w: usize,
h: usize,
bytes: &[u8],
global_alpha: u8,
) -> bool
pub fn blit_rgba( &self, x: usize, y: usize, w: usize, h: usize, bytes: &[u8], global_alpha: u8, ) -> bool
Performs the blit rgba operation.
Sourcepub fn blit_sprite_rgba(
&self,
x: usize,
y: usize,
sprite: SpriteRgba<'_>,
global_alpha: u8,
) -> bool
pub fn blit_sprite_rgba( &self, x: usize, y: usize, sprite: SpriteRgba<'_>, global_alpha: u8, ) -> bool
Performs the blit sprite rgba operation.
Sourcepub fn begin_frame(&self) -> bool
pub fn begin_frame(&self) -> bool
Performs the begin frame operation.
Sourcepub fn ui_panel(
&self,
x: usize,
y: usize,
w: usize,
h: usize,
title: &str,
body: &str,
theme: UiTheme,
)
pub fn ui_panel( &self, x: usize, y: usize, w: usize, h: usize, title: &str, body: &str, theme: UiTheme, )
Performs the ui panel operation.
Sourcepub fn ui_status_bar(&self, left: &str, right: &str, theme: UiTheme)
pub fn ui_status_bar(&self, left: &str, right: &str, theme: UiTheme)
Performs the ui status bar operation.
Sourcepub fn system_status_line(&self, theme: UiTheme)
pub fn system_status_line(&self, theme: UiTheme)
Performs the system status line operation.
Sourcepub fn layout_screen(&self) -> UiDockLayout
pub fn layout_screen(&self) -> UiDockLayout
Performs the layout screen operation.
Sourcepub fn ui_progress_bar(&self, bar: UiProgressBar)
pub fn ui_progress_bar(&self, bar: UiProgressBar)
Performs the ui progress bar operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Canvas
impl RefUnwindSafe for Canvas
impl Send for Canvas
impl Sync for Canvas
impl Unpin for Canvas
impl UnsafeUnpin for Canvas
impl UnwindSafe for Canvas
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more