Struct svgbob::Grid [−][src]
pub struct Grid { pub settings: Settings, // some fields omitted }
Fields
settings: Settings
Methods
impl Grid
[src]
impl Grid
pub fn from_str(s: &str, settings: &Settings) -> Grid
[src]
pub fn from_str(s: &str, settings: &Settings) -> Grid
instantiate a grid from input ascii text Issues:
- 2-width, 5 bytes, single character i.e. 统
- 1-width, 2 bytes, single character i.e. ö
- 1-width, 3 bytes, single character i.e. o͡͡͡
pub fn rows(&self) -> usize
[src]
pub fn rows(&self) -> usize
pub fn columns(&self) -> usize
[src]
pub fn columns(&self) -> usize
get the maximum row len
pub fn get(&self, loc: &Loc) -> Option<&String>
[src]
pub fn get(&self, loc: &Loc) -> Option<&String>
get a character at this location widths are computed since there are characters that spans 2 columns and characters that has 0 width
pub fn get_focuschar(&self, loc: &Loc) -> FocusChar
[src]
pub fn get_focuschar(&self, loc: &Loc) -> FocusChar
get the focus char at this location
pub fn get_size(&self) -> (f32, f32)
[src]
pub fn get_size(&self) -> (f32, f32)
pub fn get_svg(&self) -> SVG
[src]
pub fn get_svg(&self) -> SVG
get the generated svg according to the settings specified