Struct dwarf_term::DwarfTerm[][src]

pub struct DwarfTerm { /* fields omitted */ }

A terminal where each cell has a foreground, background, and sprite id.

Methods

impl DwarfTerm
[src]

Makes a new terminal of the given size and with the given title.

Sets the foreground color of every cell to be the given value.

Sets the foreground color of every cell to be the given value.

Sets the tile id of every cell to be the given value.

Sets the "clear" color that's used.

This just passes the call along to OpenGL. Inputs should each be in the 0.0 to 1.0 (inclusive) range. Out of bounds inputs are automatically clamped by OpenGL.

gets a mutable reference to the foreground at the position specified.

Fails if the position would be out of bounds.

gets a mutable reference to the background at the position specified.

Fails if the position would be out of bounds.

gets a mutable reference to the tile id at the position specified.

Fails if the position would be out of bounds.

Lets you poll for events on the window.

The DwarfTerm will automatically check for WindowEvent::Resized events and then keep itself up to date. However, it will also pass along such events to your callback so that you can make any necessary changes on your end as well.

Gives back all three layers at once in image slice form.

(fgs, bgs, ids).

Gives back all three layers at once in image mutable slice form.

(fgs, bgs, ids).

Clears the old screen, draws the new data, and then swaps the buffers.

This should hopefully never error! But it might. If it does, there's a strong chance it's my fault, not yours.

Trait Implementations

impl Debug for DwarfTerm
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl !Send for DwarfTerm

impl !Sync for DwarfTerm