https://bugs.kde.org/show_bug.cgi?id=149485
Gilles Caulier <[hidden email]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[hidden email] --- Comment #84 from Gilles Caulier <caulier gilles gmail com> 2009-04-15 15:44:25 --- Julien Pontabry, Are you working to fix #82 ? Anyway, see below my tips to implement preservation masks. I think you want implement something like Gimp plugin here, with hands raised mask painting. Currently, your plugin use ImageWidget to draw preview. This widget do not support zoom/panning. It's another preview widget. I recommend to always use this widget at this moment. We have planed to merge and refactoring all preview widgets together, but later in this year. Especially, the goal is to have zoom/pan feature everywhere, for all image plugins preview (one preview widget for all tools in fact) So for the moment, we will playing with ImageWidget, which use ImageGuideWidget internally. Implementation is in digikam/libs/widgets/imageplugins. To implement preservation mask you must add 2 semi-transparent Pixmap to draw over preview image. On with Red color (to remove parts) and one green (to preserve parts). This pixmap will be display on over preview by updatePixmap() http://lxr.kde.org/source/extragear/graphics/digikam/libs/widgets/imageplugins/imageguidewidget.cpp#234 I recommend to patch this widget directly and not to subclass ImageWidget, because i will use mask tool with Inpainting plugin to solve this bugzilla entry : https://bugs.kde.org/show_bug.cgi?id=110920 Now, to draw mask over preview, you can take inspiration from Marcel code: http://lxr.kde.org/source/extragear/graphics/digikam/utilities/fuzzysearch/sketchwidget.cpp This widget is used to draw a sketch to perform fuzzy search over digiKam database : http://farm4.static.flickr.com/3235/2605584602_5049955cb6_o.png You can change pencil size and redo/undo feature is available. This is enough to paint mask. This want mean than sketch code must be implemented somewhere in ImageGuideWidget. Later, when we will merge all image plugins preview widgets, we will take a care about sketch code and all other features implemented. Marcel, Andi, what do you think about ? This plan is fine for you ? Gilles -- Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |