pub struct BrailleCanvas {
pub width: usize,
pub height: usize,
/* private fields */
}Fields§
§width: usize§height: usizeImplementations§
Source§impl BrailleCanvas
impl BrailleCanvas
pub fn new(width: usize, height: usize) -> Self
Sourcepub fn pixel_width(&self) -> usize
pub fn pixel_width(&self) -> usize
Ancho en “sub-píxeles” (puntos braille)
Sourcepub fn pixel_height(&self) -> usize
pub fn pixel_height(&self) -> usize
Alto en “sub-píxeles” (puntos braille)
pub fn clear(&mut self)
Sourcepub fn set_pixel(&mut self, x: usize, y: usize, color: Option<Color>)
pub fn set_pixel(&mut self, x: usize, y: usize, color: Option<Color>)
Coordenadas CARTESIANAS: (0,0) abajo-izquierda
Sourcepub fn set_pixel_screen(&mut self, x: usize, y: usize, color: Option<Color>)
pub fn set_pixel_screen(&mut self, x: usize, y: usize, color: Option<Color>)
Coordenadas DE PANTALLA: (0,0) arriba-izquierda
Sourcepub fn line(
&mut self,
x0: isize,
y0: isize,
x1: isize,
y1: isize,
color: Option<Color>,
)
pub fn line( &mut self, x0: isize, y0: isize, x1: isize, y1: isize, color: Option<Color>, )
Línea Cartesiana
Sourcepub fn line_screen(
&mut self,
x0: isize,
y0: isize,
x1: isize,
y1: isize,
color: Option<Color>,
)
pub fn line_screen( &mut self, x0: isize, y0: isize, x1: isize, y1: isize, color: Option<Color>, )
Línea de Pantalla
pub fn circle(&mut self, xc: isize, yc: isize, r: isize, color: Option<Color>)
pub fn set_char( &mut self, col: usize, row: usize, c: char, color: Option<Color>, )
pub fn render(&self) -> String
pub fn render_no_color(&self) -> String
pub fn render_with_options( &self, show_border: bool, title: Option<&str>, ) -> String
Auto Trait Implementations§
impl Freeze for BrailleCanvas
impl RefUnwindSafe for BrailleCanvas
impl Send for BrailleCanvas
impl Sync for BrailleCanvas
impl Unpin for BrailleCanvas
impl UnwindSafe for BrailleCanvas
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