From bcc14d80b3d29651c228efcecc05ceec9a922773 Mon Sep 17 00:00:00 2001 From: Micha White Date: Mon, 13 Feb 2023 00:56:03 -0500 Subject: Expose the color module --- tvg/src/colors.rs | 2 +- tvg/src/lib.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tvg/src') 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 { +pub(crate) struct ColorTable { 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 { header: TvgHeader, color_table: ColorTable, commands: Box<[Command]>, } -impl TvgFile { +impl TvgFile { /// Read a TinyVG file. pub fn read_from(reader: &mut impl Read) -> Result { let header = TvgHeader::read(reader)?; -- cgit v1.2.3