diff options
| -rw-r--r-- | tvg/src/colors.rs | 2 | ||||
| -rw-r--r-- | tvg/src/lib.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tvg/src/colors.rs b/tvg/src/colors.rs index 9f4e7e5..494e6aa 100644 --- a/tvg/src/colors.rs +++ b/tvg/src/colors.rs @@ -11,7 +11,7 @@ use crate::TvgError; /// For the three defined color encodings, each will yield a list of /// `color_count` RGBA tuples. #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ColorTable<C: Color> { +pub(crate) struct ColorTable<C: Color> { colors: Box<[C]>, } 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)?; |
