Struct svgbob::Grid [−][src]
pub struct Grid {
pub settings: Settings,
// some fields omitted
}Fields
settings: Settings
Methods
impl Grid[src]
impl Gridpub fn from_str(s: &str, settings: &Settings) -> Grid[src]
pub fn from_str(s: &str, settings: &Settings) -> Gridinstantiate 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) -> usizepub fn columns(&self) -> usize[src]
pub fn columns(&self) -> usizeget 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) -> FocusCharget 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) -> SVGget the generated svg according to the settings specified