Skip to content

Commit

Permalink
add end_angle to angle_axis
Browse files Browse the repository at this point in the history
add end_angle to angle_axis
  • Loading branch information
LukaOber authored Oct 9, 2024
2 parents 398c52b + cec8f8e commit 371ac0e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions charming/src/component/angle_axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ pub struct AngleAxis {
#[serde(skip_serializing_if = "Option::is_none")]
start_angle: Option<f64>,

#[serde(skip_serializing_if = "Option::is_none")]
end_angle: Option<f64>,

/// Whether the direction of axis is clockwise, default to true.
#[serde(skip_serializing_if = "Option::is_none")]
clockwise: Option<bool>,
Expand Down Expand Up @@ -112,6 +115,7 @@ impl AngleAxis {
id: None,
polar_index: None,
start_angle: None,
end_angle: None,
clockwise: None,
type_: None,
zlevel: None,
Expand Down Expand Up @@ -158,6 +162,11 @@ impl AngleAxis {
self
}

pub fn end_angle<F: Into<f64>>(mut self, end_angle: F) -> Self {
self.end_angle = Some(end_angle.into());
self
}

pub fn clockwise(mut self, clockwise: bool) -> Self {
self.clockwise = Some(clockwise);
self
Expand Down

0 comments on commit 371ac0e

Please sign in to comment.