Add drawing tablet input support
This commit is contained in:
@@ -109,6 +109,10 @@ pub struct RasterToolSettings {
|
||||
// --- Gradient ---
|
||||
pub gradient: lightningbeam_core::gradient::ShapeGradient,
|
||||
pub gradient_opacity: f32,
|
||||
// --- Brush rotation offset ---
|
||||
/// User-controlled angle offset added to the brush's elliptical_dab_angle (degrees).
|
||||
/// Lets the user re-orient stock .myb brushes without editing the file.
|
||||
pub brush_angle_offset: f32,
|
||||
}
|
||||
|
||||
/// Brush mode for the Liquify tool.
|
||||
@@ -208,6 +212,7 @@ impl Default for RasterToolSettings {
|
||||
liquify_strength: 0.5,
|
||||
gradient: lightningbeam_core::gradient::ShapeGradient::default(),
|
||||
gradient_opacity: 1.0,
|
||||
brush_angle_offset: 0.0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,10 @@ impl RasterToolDef for PaintTool {
|
||||
fn blend_mode(&self) -> RasterBlendMode { RasterBlendMode::Normal }
|
||||
fn header_label(&self) -> &'static str { "Brush" }
|
||||
fn brush_params(&self, s: &RasterToolSettings) -> BrushParams {
|
||||
let mut base_settings = s.active_brush_settings.clone();
|
||||
base_settings.elliptical_dab_angle += s.brush_angle_offset;
|
||||
BrushParams {
|
||||
base_settings: s.active_brush_settings.clone(),
|
||||
base_settings,
|
||||
radius: s.brush_radius,
|
||||
opacity: s.brush_opacity,
|
||||
hardness: s.brush_hardness,
|
||||
|
||||
Reference in New Issue
Block a user