Struct barcoders::generators::svg::SVG
source · pub struct SVG {
pub height: u32,
pub xdim: u32,
pub foreground: Color,
pub background: Color,
pub xmlns: Option<String>,
}
Expand description
The SVG barcode generator type.
Fields§
§height: u32
The height of the barcode (self.height
pixels high for SVG).
xdim: u32
The X dimension. Specifies the width of the “narrow” bars.
For SVG, each will be self.xdim
pixels wide.
foreground: Color
The RGBA color for the foreground.
background: Color
The RGBA color for the foreground.
xmlns: Option<String>
The XML namespace
Implementations§
source§impl SVG
impl SVG
sourcepub fn foreground(self, color: Color) -> Self
pub fn foreground(self, color: Color) -> Self
Set the foreground (bar) color
sourcepub fn background(self, color: Color) -> Self
pub fn background(self, color: Color) -> Self
Set the background color
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SVG
impl RefUnwindSafe for SVG
impl Send for SVG
impl Sync for SVG
impl Unpin for SVG
impl UnwindSafe for SVG
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