[][src]Struct bracket_lib::prelude::DrawBatch

pub struct DrawBatch { /* fields omitted */ }

Represents a batch of drawing commands, designed to be submitted together.

Methods

impl DrawBatch[src]

pub fn new() -> Reusable<'static, DrawBatch>[src]

Obtain a new, empty draw batch

pub fn submit(&mut self, z_order: usize)[src]

Submits a batch to the global drawing buffer, and empties the batch.

pub fn cls(&mut self) -> &mut DrawBatch[src]

Adds a CLS (clear screen) to the drawing batch

pub fn cls_color(&mut self, color: RGB) -> &mut DrawBatch[src]

Adds a CLS (clear screen) to the drawing batch

pub fn target(&mut self, console: usize) -> &mut DrawBatch[src]

Sets the target console for rendering

pub fn set(&mut self, pos: Point, color: ColorPair, glyph: u8) -> &mut DrawBatch[src]

Sets an individual cell glyph

pub fn set_bg(&mut self, pos: Point, bg: RGB) -> &mut DrawBatch[src]

Sets an individual cell glyph

pub fn print<S>(&mut self, pos: Point, text: S) -> &mut DrawBatch where
    S: ToString
[src]

Prints text in the default colors at a given location

pub fn print_color<S>(
    &mut self,
    pos: Point,
    text: S,
    color: ColorPair
) -> &mut DrawBatch where
    S: ToString
[src]

Prints text in the default colors at a given location

pub fn print_centered<S>(&mut self, y: i32, text: S) -> &mut DrawBatch where
    S: ToString
[src]

Prints text, centered to the whole console width, at vertical location y.

pub fn print_color_centered<S>(
    &mut self,
    y: i32,
    text: S,
    color: ColorPair
) -> &mut DrawBatch where
    S: ToString
[src]

Prints text, centered to the whole console width, at vertical location y.

pub fn draw_box(&mut self, pos: Rect, color: ColorPair) -> &mut DrawBatch[src]

Draws a box, starting at x/y with the extents width/height using CP437 line characters

pub fn draw_hollow_box(&mut self, pos: Rect, color: ColorPair) -> &mut DrawBatch[src]

Draws a non-filled (hollow) box, starting at x/y with the extents width/height using CP437 line characters

pub fn draw_double_box(&mut self, pos: Rect, color: ColorPair) -> &mut DrawBatch[src]

Draws a double-lined box, starting at x/y with the extents width/height using CP437 line characters

pub fn draw_hollow_double_box(
    &mut self,
    pos: Rect,
    color: ColorPair
) -> &mut DrawBatch
[src]

Draws a non-filled (hollow) double-lined box, starting at x/y with the extents width/height using CP437 line characters

pub fn fill_region(
    &mut self,
    pos: Rect,
    color: ColorPair,
    glyph: u8
) -> &mut DrawBatch
[src]

Draws a non-filled (hollow) double-lined box, starting at x/y with the extents width/height using CP437 line characters

pub fn bar_horizontal(
    &mut self,
    pos: Point,
    width: i32,
    n: i32,
    max: i32,
    color: ColorPair
) -> &mut DrawBatch
[src]

Draw a horizontal progress bar

pub fn bar_vertical(
    &mut self,
    pos: Point,
    height: i32,
    n: i32,
    max: i32,
    color: ColorPair
) -> &mut DrawBatch
[src]

Draw a horizontal progress bar

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,