Struct tis_100::image::Image
[−]
[src]
pub struct Image { /* fields omitted */ }
An image that can receive values from the TIS-100. When in the Move
mode, the image receives
coordinates that tell it where to draw. When in the Paint
mode, the image will draw values.
Sending a negative value at any time will reset the image to Move
mode.
Methods
impl Image
[src]
fn new(width: usize, height: usize) -> Image
Construct a new, empty Image
with the given width and height.
fn with_data(data: &Vec<isize>, width: usize, height: usize) -> Image
Construct a new Image
with the given width, height, and initial values.
fn data(&self) -> &Vec<Color>
Retrieve the image's data.
fn write(&mut self, value: isize)
Write a value to the image. If the image is in Move
mode, then the value will be
interpreted as a coordinate. If the image is in Paint
mode, then the value will be
interpreted as a color unless the value is negative.
Trait Implementations
impl Debug for Image
[src]
impl PartialEq for Image
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.