We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86fc776 commit a969f5aCopy full SHA for a969f5a
egui_plot/src/items/mod.rs
@@ -751,7 +751,9 @@ impl Text {
751
self
752
}
753
754
- /// Text rotation angle.
+ /// Sets the text rotation angle. Angles are defined in radians, with positive values
755
+ /// resulting in a clockwise direction. Rotations are performed about the center of the
756
+ /// bounding box.
757
#[inline]
758
pub fn angle(mut self, angle: f32) -> Self {
759
self.angle = angle;
@@ -788,7 +790,7 @@ impl PlotItem for Text {
788
790
789
791
shapes.push(
792
TextShape::new(rect.min, galley, color)
- .with_angle(self.angle)
793
+ .with_angle_and_anchor(self.angle, Align2::CENTER_CENTER)
794
.into(),
795
);
796
0 commit comments