Summary: | Support nonzero fill rule for experiment brush | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | David Gowers <finticemo> |
Component: | Brush engines | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | dimula73, halla |
Priority: | NOR | ||
Version: | 2.6.3 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | All | ||
Latest Commit: | http://commits.kde.org/calligra/6ae1bfc4ae6adb13906f0687b97d19abca0482c7 | Version Fixed In: | |
Attachments: |
Implement "Winding fill" and "Hard Edge" options for Experiment brush
Simple demo of new options Set path/paint options in paintRegion instead |
Description
David Gowers
2013-04-22 06:58:25 UTC
This can be done quite easily, it just needs a UI for configuration Confirmed, then. I have implemented this, and also added a 'hard edge' option which makes it much nicer for composition design and cel-type shading. I wanted to avoid the phrase 'winding fill' in the UI, however the alternative I came up with, 'inclusive fill', was not much of an improvement. I welcome suggestions. Patch attached. Created attachment 84474 [details]
Implement "Winding fill" and "Hard Edge" options for Experiment brush
Created attachment 84475 [details]
Simple demo of new options
Demonstrates effect of drawing a triangle-in-triangle shape with each possible combination of the new settings.
Hi, D Gowers! Your patch looks really nice! I have only a small comment about it: m_path object may be overridden while the stroke is running. E.g. in calls to trySimplifyPath(), so you might need to move the 'm_path.setFillRule(Qt::WindingFill)' line to the beginning of paintRegion() function to ensure the setting is applied in all circumstances. After checking this issue we can surely push the patch. Do you have a write access to KDE's git repo? If not, I can push it for you. Thank you Dmitry. I have tested with some more exotic settings, and indeed the winding setting of the path can get lost when smoothing is on. (oddly enough, the antialiasing state is preserved correctly.) Anyway I have implemented your proposed solution and it appears to fix this. Updated patch attached. I'd appreciate if you would push it for me, I don't currently have push privileges. Created attachment 84489 [details]
Set path/paint options in paintRegion instead
Also fixed some cosmetic consistency issues.
Git commit 3e5908f3af3b14317eff7c3b955a89f32dfc54f2 by Dmitry Kazakov, on behalf of David Gowers. Committed on 07/01/2014 at 08:22. Pushed by dkazakov into branch 'master'. Add support for nonzero fill rule for experiment brush Thanks David Gowers for preparing this patch! M +9 -0 krita/plugins/paintops/experiment/kis_experiment_paintop.cpp M +3 -0 krita/plugins/paintops/experiment/kis_experiment_paintop.h M +6 -0 krita/plugins/paintops/experiment/kis_experimentop_option.cpp M +7 -0 krita/plugins/paintops/experiment/kis_experimentop_option.h M +18 -0 krita/plugins/paintops/experiment/wdgexperimentoptions.ui http://commits.kde.org/calligra/3e5908f3af3b14317eff7c3b955a89f32dfc54f2 Hi, David! Congrats! Now you have your first patch in KDE repo! :) Git commit 6ae1bfc4ae6adb13906f0687b97d19abca0482c7 by Dmitry Kazakov, on behalf of David Gowers. Committed on 07/01/2014 at 08:22. Pushed by dkazakov into branch 'calligra/2.8'. Add support for nonzero fill rule for experiment brush Thanks David Gowers for preparing this patch! M +9 -0 krita/plugins/paintops/experiment/kis_experiment_paintop.cpp M +3 -0 krita/plugins/paintops/experiment/kis_experiment_paintop.h M +6 -0 krita/plugins/paintops/experiment/kis_experimentop_option.cpp M +7 -0 krita/plugins/paintops/experiment/kis_experimentop_option.h M +18 -0 krita/plugins/paintops/experiment/wdgexperimentoptions.ui http://commits.kde.org/calligra/6ae1bfc4ae6adb13906f0687b97d19abca0482c7 |