pub struct ConsoleSpec {
pub cols: u16,
pub rows: u16,
pub cell_w: u16,
pub cell_h: u16,
}Expand description
A console’s size: cols × rows cells of cell_w × cell_h logical
pixels. The frame (GlyphBuffer) keeps the spec
it was made with; the game picks one when it starts (game ADR-0070 §6).
Fields§
§cols: u16Width in cells.
rows: u16Height in cells.
cell_w: u16Cell width in logical pixels.
cell_h: u16Cell height in logical pixels.
Implementations§
Source§impl ConsoleSpec
impl ConsoleSpec
Sourcepub const fn text(cols: u16, rows: u16) -> Self
pub const fn text(cols: u16, rows: u16) -> Self
cols × rows cells of 8 × 16 pixels, the cell of a classic text
console (and of GlyphBuffer::new).
Trait Implementations§
Source§impl Clone for ConsoleSpec
impl Clone for ConsoleSpec
Source§fn clone(&self) -> ConsoleSpec
fn clone(&self) -> ConsoleSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ConsoleSpec
Source§impl Debug for ConsoleSpec
impl Debug for ConsoleSpec
impl Eq for ConsoleSpec
Source§impl Hash for ConsoleSpec
impl Hash for ConsoleSpec
Source§impl PartialEq for ConsoleSpec
impl PartialEq for ConsoleSpec
impl StructuralPartialEq for ConsoleSpec
Auto Trait Implementations§
impl Freeze for ConsoleSpec
impl RefUnwindSafe for ConsoleSpec
impl Send for ConsoleSpec
impl Sync for ConsoleSpec
impl Unpin for ConsoleSpec
impl UnsafeUnpin for ConsoleSpec
impl UnwindSafe for ConsoleSpec
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