We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 678f412 commit 873be17Copy full SHA for 873be17
1 file changed
egui_plot/src/items/mod.rs
@@ -678,7 +678,9 @@ impl Text {
678
self
679
}
680
681
- /// Text rotation angle.
+ /// Sets the text rotation angle. Angles are defined in radians, with positive values
682
+ /// resulting in a clockwise direction. Rotations are performed about the center of the
683
+ /// bounding box.
684
#[inline]
685
pub fn angle(mut self, angle: f32) -> Self {
686
self.angle = angle;
@@ -715,7 +717,7 @@ impl PlotItem for Text {
715
717
716
718
shapes.push(
719
TextShape::new(rect.min, galley, color)
- .with_angle(self.angle)
720
+ .with_angle_and_anchor(self.angle, Align2::CENTER_CENTER)
721
.into(),
722
);
723
0 commit comments