summaryrefslogtreecommitdiff
path: root/tvg/src/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvg/src/path.rs')
-rw-r--r--tvg/src/path.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/tvg/src/path.rs b/tvg/src/path.rs
index 2bc0448..a576eb8 100644
--- a/tvg/src/path.rs
+++ b/tvg/src/path.rs
@@ -4,7 +4,7 @@ use byteorder::ReadBytesExt;
use num_enum::TryFromPrimitive;
use raise::yeet;
-use crate::{header::TvgHeader, read_unit, read_varuint, Decode, Point, TvgError};
+use crate::{commands::Point, header::TvgHeader, read_unit, read_varuint, Decode, TvgError};
/// Returns an error if the padding isn't zero
fn check_padding(padding: u8) -> Result<(), TvgError> {
@@ -17,7 +17,7 @@ fn check_padding(padding: u8) -> Result<(), TvgError> {
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, TryFromPrimitive)]
#[repr(u8)]
-enum Sweep {
+pub(crate) enum Sweep {
Right = 0,
Left = 1,
}
@@ -47,7 +47,7 @@ enum InstructionKind {
}
#[derive(Debug, Clone, Copy)]
-enum InstructionData {
+pub(crate) enum InstructionData {
/// The line instruction draws a straight line to the position.
Line {
/// The end point of the line.
@@ -231,11 +231,11 @@ impl InstructionData {
}
#[derive(Debug, Clone)]
-struct Instruction {
+pub(crate) struct Instruction {
/// The width of the line the "pen" makes, if it makes one at all.
- line_width: Option<f64>,
+ pub(crate) line_width: Option<f64>,
/// The arguments to the instruction.
- data: InstructionData,
+ pub(crate) data: InstructionData,
}
impl Instruction {
@@ -258,11 +258,11 @@ impl Instruction {
}
#[derive(Debug, Clone)]
-struct Segment {
+pub(crate) struct Segment {
/// The starting point of the segment.
- start: Point,
+ pub(crate) start: Point,
/// The list of instructions for tha segment.
- instructions: Box<[Instruction]>,
+ pub(crate) instructions: Box<[Instruction]>,
}
impl Segment {
@@ -294,7 +294,7 @@ impl Segment {
/// outline of the shape.
#[derive(Debug, Clone)]
pub struct Path {
- segments: Box<[Segment]>,
+ pub(crate) segments: Box<[Segment]>,
}
impl Path {