ellipse.rs 502 B

123456789101112131415161718192021
  1. use binrw::{BinRead, BinWrite};
  2. use crate::{
  3. field_of::FieldOf,
  4. types::{Field, Point, F64, U32},
  5. };
  6. use super::ObjectCore;
  7. #[derive(BinRead, BinWrite, Debug)]
  8. pub struct Ellipse {
  9. pub core: ObjectCore,
  10. #[brw(magic(8u32))] // Number of following fields in struct
  11. pub clockwise: U32,
  12. pub corner_a: FieldOf<Point>,
  13. pub corner_b: FieldOf<Point>,
  14. pub start_angle: F64, // Radians
  15. pub end_angle: F64, // Radians
  16. _unknown_1: [Field; 2],
  17. pub open_curve: U32,
  18. }