1234567891011121314151617181920212223242526272829 |
- use std::fmt::Display;
- use binrw::{BinRead, BinWrite};
- use crate::{array_of::ArrayOf, types::Point};
- use super::ObjBase;
- #[derive(BinRead, BinWrite, Debug)]
- pub enum LineType {
- #[brw(magic = 0x0001u64)]
- Point(Point),
- #[brw(magic = 0x0100u64)]
- Line { points: ArrayOf<Point> },
- #[brw(magic = 0x0300u64)]
- Bezier { points: ArrayOf<Point> },
- }
- #[derive(BinRead, BinWrite, Debug)]
- pub struct Lines {
- pub base: ObjBase,
- pub lines: ArrayOf<LineType>,
- }
- impl Display for Lines {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(f, "{}", self.base)
- }
- }
|