#[cfg(feature = "serde")]
use serde::Serialize;
use crate::{
processed::drawing::common_types::{
adjust_angle::AdjustAngle, adjust_coordinate::AdjustCoordinate,
},
raw::drawing::shape::{path::arc_to::XlsxArcTo, shape_guide::XlsxShapeGuide},
};
#[derive(Debug, Clone, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize))]
pub struct ArcTo {
pub height_radius: AdjustCoordinate,
pub width_radius: AdjustCoordinate,
pub start_angle: AdjustAngle,
pub swing_angle: AdjustAngle,
}
impl ArcTo {
pub(crate) fn from_raw(raw: XlsxArcTo, guide_list: Option<Vec<XlsxShapeGuide>>) -> Self {
return Self {
height_radius: AdjustCoordinate::from_raw(raw.height_radius, guide_list.clone()),
width_radius: AdjustCoordinate::from_raw(raw.width_radius, guide_list.clone()),
start_angle: AdjustAngle::from_raw(raw.start_angle, guide_list.clone()),
swing_angle: AdjustAngle::from_raw(raw.swing_angle, guide_list.clone()),
};
}
}