Compare commits
1
Commits
d21fa91315
...
v0.29.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fafff5eaf |
+2
-1
@@ -616,7 +616,8 @@ impl Stroke {
|
|||||||
pub fn recompute_aabb(&mut self) {
|
pub fn recompute_aabb(&mut self) {
|
||||||
// Ohne Zwischenliste: läuft beim Ziehen einer Auswahl für jeden Strich und jede Bewegung
|
// Ohne Zwischenliste: läuft beim Ziehen einer Auswahl für jeden Strich und jede Bewegung
|
||||||
let bounds = |mut pts: Box<dyn Iterator<Item = glam::Vec2> + '_>| {
|
let bounds = |mut pts: Box<dyn Iterator<Item = glam::Vec2> + '_>| {
|
||||||
pts.next().map_or(Aabb::new(glam::Vec2::ZERO, glam::Vec2::ZERO), |first| {
|
pts.next()
|
||||||
|
.map_or(Aabb::new(glam::Vec2::ZERO, glam::Vec2::ZERO), |first| {
|
||||||
pts.fold(Aabb::new(first, first), |mut aabb, p| {
|
pts.fold(Aabb::new(first, first), |mut aabb, p| {
|
||||||
aabb.expand_by_point(p);
|
aabb.expand_by_point(p);
|
||||||
aabb
|
aabb
|
||||||
|
|||||||
Reference in new issue
Block a user