Dynamic Brush Spacing

Objective

Improve the quality of the brush spacing with respect to velocity.

Design Revisions

RevisionCurrent DesignIssuesChanges
1. Remove Spacing LimitsSpacing is set to 200% for fastSpacing does not respect the Paint Tool slider settingsSpacing respects the slider values

Notes

This feature branch was a proposed solution to https://gitlab.gnome.org/GNOME/gimp/-/issues/1863

Without Feature: Top is a slow stroke, middle line fast, lower is slow to fast. without-feature

With Feature: Top is a slow stroke, middle line fast, lower is slow to fast. with-feature

Changes

  • Simplified Dynamic Spacing Calculation:
    • Removed the formula that scaled spacing up to 200%.
    • Now, dynamic spacing is directly multiplied by core->spacing, ensuring a simpler and more predictable behavior.
    • The minimum spacing is clamped to EPSILON to prevent it from becoming too small.

Benefits

  • The new approach provides cleaner, more predictable spacing behavior, adhering more closely to user-defined values without arbitrary limits.