Skip to content

fix(colordrop): contain fills within soft and textured outlines - #247

Open
wesleydanieell wants to merge 6 commits into
artcraft-android:mainfrom
wesleydanieell:fix/colordrop-soft-brushes
Open

wesleydanieell wants to merge 6 commits into
artcraft-android:mainfrom
wesleydanieell:fix/colordrop-soft-brushes

Conversation

@wesleydanieell

Copy link
Copy Markdown
Contributor

Summary

  • Make ColorDrop treat low-opacity and translucent brush marks as effective boundaries on transparent layers, rather than flooding through their weak premultiplied alpha.
  • Bridge 1–2 px pores in textured outlines only in the fill-connectivity map: the original brush pixels and grain remain untouched. Larger intentional openings remain open.
  • Extend the poured colour beneath soft and granular line edges to reduce pale halos, and make drops on nearly transparent pixels blend as a fill under the existing brush.
  • Keep the seed reachable when dropping directly into a small textured pore, and remeasure when an existing flood's synthetic barrier makes a new seed unreachable.
  • Make the existing ColorDrop spreading reveal visible from the beginning, with updated timing regression coverage.
  • Cache the 256 possible alpha-coverage distances instead of evaluating powf for each canvas pixel.

Validation

  • cargo fmt --all -- --check — passed.
  • cargo clippy --workspace --all-targets -- -D warnings — passed.
  • cargo test -p procraft-engine -p procraft-core --lib --quiet — 477 engine tests and 979 core tests passed (32 ignored in total).
  • New unit regression coverage: faint lines, granular circular/diagonal outlines, transparent pores, wide intentional gaps, halo-free underpainting and near-transparent seeds.
  • Android ARM64 debug build was assembled and installed successfully on a Redmi Pad 2 prior to the lookup-table-only performance optimization. The final performance change preserves all 256 distance values and has passed the full Rust tests.

Notes

  • ColorDrop threshold is still user-controlled. A threshold of 100% intentionally reaches every pixel, regardless of the contour. During manual testing, a previously saved nearly-100% threshold explained an apparent whole-canvas leak; resetting it to 50% restored normal boundaries. This PR does not change that intended high-threshold behaviour.
  • No unrelated QuickShape or generated files are part of this branch. The optional ColorDrop gap-closing plugin retains its existing separate role for larger openings.
  • Commits include Co-authored-by: Codex <codex@openai.com>.

wesleydanieell and others added 6 commits November 16, 2026 23:11
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Keep direct drops inside tiny textured gaps fillable and remeasure synthetic barriers on reseeding.

Co-authored-by: Codex <codex@openai.com>
Avoid per-pixel power calculations and add closed textured ring regression coverage. Align safety and timing assertions with workspace lint rules.

Co-authored-by: Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant