bulia byak wrote:
- If the [Ctrl] key is held down, clicking on an object changes the fill
color to the current fill color, and [Shift]-[Ctrl] changes the stroke color to the current stroke color
Yes. This should behave exactly like drag-dropping a color from the palette onto drawing (i.e. disregard selection and grouping). You can just pick the code from there and reuse in your tool.
I'm busy for the beginning of this week, so I'll look into this later this week.
- A way to either manually or dynamically increase the resolution of the
rendered version so that the accuracy of the flood fill is better
I think this can be fixed very simply. Instead of rendering the bitmap always at 100%, render it at the current zoom. This makes sense - since our tool is already "perceptual", it's not a bad thing for its results to depend on how you view your image. If you need more precision, just zoom in closer.
This presents another problem, however: if you're zoomed in too closely, rendering the entire image at this zoom may become prohibitively slow. To work around that, I propose to render not the entire drawing but only its visible part plus, say, 20% on each of the four sides. That will render about as fast as screen redraw. This means you won't be able to fill in a big area while zooming in to only a part of it, and you'll need to zoom out to see all of the area. But I think it's a reasonable choice; by zooming in and out, you will be able to find the exact balance between the coverage and precision.
This sounds good. Where is the existing transformation that decides how much of the screen to repaint? I'll most likely end up reusing that one.
- we need a toolbar control for setting sensitivity threshold of the
flood
I'll need to implement the threshold code, but that's really simple to do. Is adding the preference for this the same as adding the preference for the tool fill/stroke style?
- do we decide to call it "Flood tool"? or better "Paintbucket"?
I would lean towards "Paint Bucket".
- please add a section to doc/keys.xml describing all the shortcuts of
the tool
OK, I'll add this later this week, as well.
Thanks,
John