diff options
| author | Micha White <botahamec@outlook.com> | 2024-08-15 20:14:15 -0400 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2024-08-15 20:14:15 -0400 |
| commit | f8a80039c74332e2101a177ef3fde31ef2077224 (patch) | |
| tree | f887c96bf9879a28b7ce914ad96161f63ee83190 /tvg/src/lib.rs | |
| parent | 488c7ed94b0662222fa0d825ab81b60b0b1e5d6c (diff) | |
Lots a changes
Diffstat (limited to 'tvg/src/lib.rs')
| -rw-r--r-- | tvg/src/lib.rs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/tvg/src/lib.rs b/tvg/src/lib.rs index 5c9e1d2..16a95bd 100644 --- a/tvg/src/lib.rs +++ b/tvg/src/lib.rs @@ -10,6 +10,7 @@ pub mod colors; mod commands; mod header; mod path; +mod render; pub use header::SUPPORTED_VERSION; @@ -146,24 +147,6 @@ fn read_unit(reader: &mut impl Read, header: &TvgHeader) -> io::Result<f64> { Ok((value as f64) / fractional) } -/// A X and Y coordinate pair. -#[derive(Debug, Clone, Copy)] -pub struct Point { - /// Horizontal distance of the point to the origin. - x: f64, - /// Vertical distance of the point to the origin. - y: f64, -} - -impl Decode for Point { - fn read(reader: &mut impl Read, header: &TvgHeader) -> io::Result<Self> { - Ok(Self { - x: read_unit(reader, header)?, - y: read_unit(reader, header)?, - }) - } -} - fn read_varuint(reader: &mut impl Read) -> io::Result<u32> { let mut count = 0; let mut result = 0; |
