Expand description
Rendering pipeline for converting QR codes into visual output.
This module provides the Pixel and Canvas traits that abstract over
different output formats, and the Renderer builder that drives the
conversion from QR code data to a final image.
§Supported formats
| Module | Feature | Output type |
|---|---|---|
image | image | PNG/JPEG via the image crate |
svg | svg | SVG XML string |
eps | eps | Encapsulated PostScript |
html | html | HTML table or CSS Grid |
pic | pic | PIC (troff) macros |
string | — | Plain text with custom characters |
unicode | — | Unicode block-element rendering |
§Custom rendering
Implement Pixel for your own type to render into a custom format.
The Pixel trait defines how to create dark/light pixels and how to
finalize a canvas into a concrete image.
Modules§
- ansi
- ANSI terminal color rendering.
- colors
- Common color types and conversions for rendering.
- plugin
- Built-in renderer plugins backed by
qrcode-render. - string
- String rendering support.
- unicode
- UTF-8 rendering, with various pixel densities.
Structs§
- Renderer
- A QR code renderer. This is a builder type which converts a bool-vector into an image.
Enums§
- Color
- The color of a module.
- Render
Error - Errors returned by fallible render construction or rendering.
Traits§
- Canvas
- Rendering canvas of a QR code image.
- Pixel
- Abstraction of an image pixel.
- Render
Template - Styling data that can be applied to a
RendererwithRenderer::template. - Styled
Pixel - A
Pixelconstructible from a CSS-style hex color string ("#rrggbb"or"#rgb"), used byRenderer::templateto apply aQrTemplate.