Module pix_engine::draw[][src]

Expand description

Drawing methods.

Provides a Draw trait as well standard draw methods.

Provided PixState methods:

Example

fn on_update(&mut self, s: &mut PixState) -> PixResult<()> {
    s.background(Color::ALICE_BLUE);
    s.clear();
    let rect = rect![0, 0, 100, 100];
    s.fill(Color::RED);
    s.stroke(Color::BLACK);
    s.rect(rect)?;
    Ok(())
}

Traits

Trait for objects that can be drawn to the screen.