feat: kako-jun/patcolour#5 negative guide を追加 - #9
Merged
Conversation
- filter.py: _draw_regions ヘルパーに共通化して generate_region_mask / generate_exclude_mask の重複を解消 - spec.md: --exclude-ellipse に hard edge 注記を追加、--mask + exclude の挙動を明記 - test_cli.py: argparse / main を先頭 import に移動、関数内 import を削除、テスト名リネーム
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
negative guide(除外領域指定)機能を実装。
Changes
generate_exclude_mask()追加(height, width, rects, ellipses → 除外マスク)apply_partial_colorにexclude_rects/ellipses/rects_rel/ellipses_rel引数を追加--exclude-rect/--exclude-ellipse/--exclude-rect-rel/--exclude-ellipse-relを追加docs/spec.mdに negative guide と precedence rule を追記Precedence Rule
final = positive AND NOT excludeexclude は positive/color-distance/region のどの組み合わせより常に勝つ。
Closes #5