diff options
| author | Micha White <botahamec@outlook.com> | 2023-02-13 00:56:03 -0500 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2023-02-13 00:56:03 -0500 |
| commit | bcc14d80b3d29651c228efcecc05ceec9a922773 (patch) | |
| tree | 9d56af63e7f132c972e8efd4bbbe0301e2d9c7bc /tvg/src/lib.rs | |
| parent | 38008d6a84457afad717e4524adcf963305fb0b7 (diff) | |
Expose the color module
Diffstat (limited to 'tvg/src/lib.rs')
| -rw-r--r-- | tvg/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tvg/src/lib.rs b/tvg/src/lib.rs index 6b07ff0..5c9e1d2 100644 --- a/tvg/src/lib.rs +++ b/tvg/src/lib.rs @@ -1,26 +1,26 @@ use std::io::{self, Read}; use byteorder::{LittleEndian, ReadBytesExt}; -use colors::ColorTable; +use colors::{Color, ColorTable}; use commands::Command; use header::{CoordinateRange, Scale, TvgHeader}; use thiserror::Error; -mod colors; +pub mod colors; mod commands; mod header; mod path; -pub use colors::{Color, Rgb565, Rgba16, Rgba8888, RgbaF32}; pub use header::SUPPORTED_VERSION; +#[derive(Debug, Clone)] pub struct TvgFile<C: Color> { header: TvgHeader, color_table: ColorTable<C>, commands: Box<[Command]>, } -impl<C: Color + std::fmt::Debug> TvgFile<C> { +impl<C: Color> TvgFile<C> { /// Read a TinyVG file. pub fn read_from(reader: &mut impl Read) -> Result<Self, TvgError> { let header = TvgHeader::read(reader)?; |
