mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-20 14:30:43 +01:00
- The brush stroke paints while points are placed and dragged (3D and 2D); applying is one undo step, Esc removes the unfinished path - Click the curve to insert a point, select a point and remove it with Backspace or the Remove point button; undo steps through point changes - The selected layer's other paths are drawn (lit under the pointer) and a click opens one for editing; 3D lines follow where their paint lands - A path repaint recomposites only the tiles it changed, not the whole set - Pen pointer for the tool; new paths start open; Apply/Cancel removed - Switching texture sets applies a path being placed first Closes #333
18 lines
593 B
Rust
18 lines
593 B
Rust
//! What a pointer position in a view is over, for the Path tool
|
|
|
|
use egui::Pos2;
|
|
use texturecraft_engine::core::LayerId;
|
|
|
|
/// What a pointer position in a view is over, for the Path tool
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub(crate) enum PathHit {
|
|
/// A control point of the path being edited
|
|
Point(usize),
|
|
/// The edited path's curve: the segment starting at this point, and the nearest screen position on it
|
|
Curve(usize, Pos2),
|
|
/// Another stored path of the selected layer: (path sublayer, index)
|
|
Stored(LayerId, usize),
|
|
/// Nothing of a path
|
|
Miss,
|
|
}
|