Smart Fill Tool

Bug #170883 reported by Bug Importer
0
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Low
Unassigned

Bug Description

It would be very nice to implement a context sensitive
fill tool, that does Just What You Want. I.e. one where
the user can select a colour and click on any location
to perform an appropiate action. e.g.

Click on the interior of a shape to change its fill colour.
Click on the exterior of a shape to change its line colour.
Click on a closed intersection of shapes to create a
new object layered or shaped appropiately to give that
intersection the required colour.
Click on the background to change the background colour.

I'd personally find this really useful.

<email address hidden>

Revision history for this message
Erich-users (erich-users) wrote :

Most of it boils down to some clever intersecting.
I just had drawn an outline using the calligraphy tool, and
wanted to fill its inside. The fill options of course would
change the color of the outline...
The "workaround" was to merge all my calligraphy paths, then
place a box around it, then intersect these, break the
result apart, and delete the outside.
The result should consist of paths for the original path and
the "interiors".

Revision history for this message
Prokoudine (prokoudine) wrote :

Could you please eloborate on defining "exterior" of a shape? :)

Does it mean clicking outside of a shape, or clicking
exactly the stroke of a shape?

Does a shape should be selected before filling its
"interior" or stroke?

If no, how would you colorize a stroke with 0 width and
transparent fill? ;)

Another little thing. Say, you have two layers. The first
layer contains a rectangle that is as large as the page
itself, so that you don't see the background at all. The
second layer contains some object and is currently active.
How would you apply a color to background in this case??

Revision history for this message
Bug Importer (bug-importer) wrote :

"Does it mean clicking outside of a shape, or clicking
exactly the stroke of a shape? "

Clicking exactly the stroke, yes.

Ok, I suppose it won't be able to change the colour of zero
width strokes.

So, really, it would be best to split this tool into two
tools. First, a format paster, which applies a format to
each clicked on object. (This would include fills, strokes,
gradients, maybe even fonts and things like that, where
applicable.) Include an eyedropper or a modifier key to
import from objects.

Second would be the smart flood filler. (There was an
earlier submission on this, and I think it's idea of
rendering, then tracing is workable, if rather awkward and
inefficient. An intersector would be ideal.)

As for the background thing, well, you don't *have* to use
this tool for every circumstance. The point of the tool is
to provide a fast and intuitive way that works most of the
time. For the odd case where it won't work, the manual ways
should be left in.

Revision history for this message
Prokoudine (prokoudine) wrote :

> First, a format paster, which applies a format to each
clicked on object.

Are you talking about already present Edit - Paste style? :)

http://tavmjong.free.fr/INKSCAPE/MANUAL/html/ch05s03.html

Revision history for this message
Bug Importer (bug-importer) wrote :

Yes, but better integrated with a palette and stuff.

Ideally, we can combine the fill and stroke dialog and paste
style into a single tool.

Revision history for this message
Bryce Harrington (bryce) wrote :

One comment is that the calligraphy tool does not work quite
like it seems intuitively.

You would think that when you draw a calligraphy stroke,
that it creates a path entity with variable stroke-width as
it goes. However, it's not like that at all; it instead
creates a polygon with a path that goes around the boundary
edges. The interior of this polygon is filled, and it
"looks" like a calligraphy stroke.

It's the peculiarities of this implementation of calligraphy
which makes it really weird to do a "fill within the
calligraphy stroke", since really what this means is "fill
outside the polygon where it intersects itself".

Anyway, possibly this could be achieved, but I would imagine
it'd be fairly tricky to implement.

For the "format paster", like prokoudine pointed out, that
idea probably belongs with the paste-style function, and I
think would be completely unrelated to this calligraphy fill
functionality, so can you review how paste-style works and
then submit a new RFE detailing your idea on how to make it
more powerful?

Revision history for this message
Erich-users (erich-users) wrote :

Hello bryce,
No, it's not that difficult. As explained earlier, here's a
way to do the "fill within the calligraphy stroke" with
current inkscape:

1. Place a rectangle bigger than the calligraphy stroke over
it (i.e. increased bounding box)
2. subtract the caligraphy stroke from the rectangle
3. break-apart the rectangle remains
4. delete the outmost part of the bounding box

This should be easily scriptable, so probably not "tricky to
implement" ;-)
The UI part is the hard one - use all layers, visible
layers, current layer etc.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.