[][src]Struct qrcode53bytes::rendersvg::SvgRenderer

pub struct SvgRenderer {
    light: Color,
    dark: Color,
    w: usize,
    h: usize,
    qz: bool,
}

A string renderer for converting a QR code into svg.

Fields

light: Colordark: Colorw: usizeh: usizeqz: bool

Implementations

impl SvgRenderer[src]

pub fn new() -> Self[src]

Create a new renderer.

pub fn light_module(self, v: Color) -> Self[src]

Set the light module color. Will also be the color of the quiet zone, if relevant.

pub fn dark_module(self, v: Color) -> Self[src]

Set the dark module color.

pub fn quiet_zone(self, v: bool) -> Self[src]

Set if quiet zone should be produced.

pub fn dimensions(self, w: usize, h: usize) -> Self[src]

Set the dimensions of the output, in pixels. Includes the quiet zone, if relevant.

pub fn render(&self, qr: &Qr) -> String[src]

Render QR.

pub fn render_matrix(&self, matrix: &Matrix) -> String[src]

Render matrix.

Auto Trait Implementations

impl RefUnwindSafe for SvgRenderer

impl Send for SvgRenderer

impl Sync for SvgRenderer

impl Unpin for SvgRenderer

impl UnwindSafe for SvgRenderer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.