merge-c: c1: rustfmt

This commit is contained in:
aiongg
2026-11-16 12:43:35 +00:00
parent 95c557733f
commit 4a445d10b6
3 changed files with 7 additions and 7 deletions
+3 -1
View File
@@ -18,7 +18,9 @@ pub mod snap;
pub use crop::{AspectHold, CropBox, CropGuide, GuideShow, crop_view, crop_view_about, hit_rect, screen_step, turn_grid};
pub use draft::{DraftEvent, DraftKind, DraftPoint, DraftReach, OutlineDraft};
pub use lock::{AXIS_BAND_DEGREES, Directions, LOCK_HYSTERESIS_DEGREES, axis_or_diagonal, lock_direction, polygon_step, round_to_direction, turn_to_45};
pub use lock::{
AXIS_BAND_DEGREES, Directions, LOCK_HYSTERESIS_DEGREES, axis_or_diagonal, lock_direction, polygon_step, round_to_direction, turn_to_45,
};
pub use marquee::{Constraint, MarqueeGesture, MarqueeRect, fixed_size_pixels, marquee_pixels, square_pixels};
pub use move_gesture::{ConstrainStyle, MoveGesture, MoveValue, StrokeLock};
pub use outside::outside_pieces;
+3 -5
View File
@@ -156,11 +156,9 @@ impl ShapeGeometry {
pub fn bounds(&self) -> Rect {
// pc: crates/ui-egui/src/tools/vector_ui/shapes.rs:85-96 `shape_bounds` (a line's ends' box).
match *self {
Self::Rect { rect, .. }
| Self::Ellipse { rect }
| Self::Triangle { rect }
| Self::Polygon { rect, .. }
| Self::Custom { rect, .. } => rect.abs(),
Self::Rect { rect, .. } | Self::Ellipse { rect } | Self::Triangle { rect } | Self::Polygon { rect, .. } | Self::Custom { rect, .. } => {
rect.abs()
}
Self::RadialPolygon { center, radius, .. } => Rect::new(center.x - radius, center.y - radius, center.x + radius, center.y + radius),
Self::Line { from, to, .. } => Rect::from_points(from, to),
}
+1 -1
View File
@@ -12,9 +12,9 @@ use craft_ui::runtime::env::Label;
use kurbo::{Point, Vec2};
use super::words::ShapeDragWords;
use crate::ui::shape::VectorMode;
use super::{BoxConstraint, ShapeDragEvent, ShapeDragOptions, ShapeDragRules, ShapeFrame, ShapeKind};
use crate::geometry::shape::{BoxRule, MIN_SIDE, RadialFrame, SIDES, ShapeGeometry, box_drag, equilateral_in, line_drag};
use crate::ui::shape::VectorMode;
/// The flattening tolerance of the outline being drawn, in screen points.
const OUTLINE_TOLERANCE: f32 = 0.25;