Struct svgbob::Settings [−][src]
pub struct Settings { pub text_width: f32, pub text_height: f32, pub optimize: bool, pub compact_path: bool, pub class: Option<String>, pub id: Option<String>, pub font_family: String, pub font_size: f32, pub stroke_width: f32, pub stroke_color: String, pub background_color: String, }
optimization options:
- None -> Fastest, but not correct looking (paths and text are not reduced)
- Fast -> Fast and correct looking (text are reduced)
- All -> Correct looking but slow (paths and text are reduced)
Fields
text_width: f32
text_height: f32
optimize: bool
do optimization? if false then every piece are disconnected
compact_path: bool
if optmization is enabled, true means all reduceable paths will be in 1 path definition
class: Option<String>
the svg class of the generated svg
id: Option<String>
the id of the generated svg
font_family: String
the font family used for text (default: arial)
font_size: f32
the font size used for text (default: 14)
stroke_width: f32
stroke width for all lines (default: 2.0)
stroke_color: String
stroke color, default black
background_color: String
background color: default white
Methods
impl Settings
[src]
impl Settings
pub fn set_size(&mut self, text_width: f32, text_height: f32)
[src]
pub fn set_size(&mut self, text_width: f32, text_height: f32)
pub fn scale(&mut self, scale: f32)
[src]
pub fn scale(&mut self, scale: f32)
pub fn no_optimization() -> Settings
[src]
pub fn no_optimization() -> Settings
pub fn separate_lines() -> Settings
[src]
pub fn separate_lines() -> Settings
pub fn compact() -> Settings
[src]
pub fn compact() -> Settings
pub fn set_selector(&mut self, id: Option<String>, class: Option<String>)
[src]
pub fn set_selector(&mut self, id: Option<String>, class: Option<String>)
Trait Implementations
impl Debug for Settings
[src]
impl Debug for Settings
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Settings
[src]
impl Clone for Settings
fn clone(&self) -> Settings
[src]
fn clone(&self) -> Settings
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Default for Settings
[src]
impl Default for Settings