1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 15:13:12 -04:00

Add Align2::anchor_size (#3863)

This commit is contained in:
Emil Ernerfeldt
2024-01-22 16:47:50 +01:00
committed by GitHub
parent 9fb83d3541
commit 31cc31a67b
4 changed files with 21 additions and 6 deletions

View File

@@ -728,9 +728,7 @@ impl PlotItem for Text {
.into_galley(ui, Some(false), f32::INFINITY, TextStyle::Small);
let pos = transform.position_from_point(&self.position);
let rect = self
.anchor
.anchor_rect(Rect::from_min_size(pos, galley.size()));
let rect = self.anchor.anchor_size(pos, galley.size());
shapes.push(epaint::TextShape::new(rect.min, galley, color).into());