Mobile app version of vmapp.org
Login or Join
Shelley591

: Colour defined area fraction of shape in inkscape I have a number of complex shapes (for example a sketch of a gecko, an ant and a frog) and want to colour a defined fraction of the area

@Shelley591

Posted in: #Color #Inkscape #Measurement

I have a number of complex shapes (for example a sketch of a gecko, an ant and a frog) and want to colour a defined fraction of the area of each sketch from the bottom, e.g. 20% of the gecko in blue, 30% of the ant in red etc.

As an illustration, I uploaded two example shapes:

The rectangle on the left has 20% of its area filled from the bottom, which is easy enough to do. For more complex shapes, however, as the one on the right, it is less trivial. Is there any way to do this in inkscape?

Thanks!

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelley591

2 Comments

Sorted by latest first Latest Oldest Best

 

@Cofer715

You can do iteratively, by hand, at least with 0.91:

Draw your shape. See my beautiful walrus:

In the extensions-menue, there is a point - in German it is "Erweiterungen/Pfad visualisieren/Pfad ausmessen" In English it should be similar to 'Extensions/visualize path/measure path'. You mark the path in question, select 'area' from the drop down, and 'perform/commit/enter' (anwenden).

Now the size is printed as in the upper left corner. Now we calculate that value to 20% or whateve we need, which gives me round about 14.000.

Create a duplicate of the path, and remove the upper nodes, pull the lower nodes down, measure, repeat.

It might be hard for a figure with many interceptions and a lot of work, depending on how exactly it has to fit and how complex the figures are, but for an error below 1%, I guess it is doable.

Bonus quesiton: Why is the size negative? I have no idea. :) 5 positive vectors, 3 negative ones, multiplied?

10% popularity Vote Up Vote Down


 

@Jennifer810

Question not entirely clear, is the following strategy useful?

1) Create your form (ant, ...)


2) Create your fill rectangle (here in red)


3) Make a clone of the form you made in step 1 (select the form, then Edit > Clone > Create Clone or shortcut Alt+D)


4) Use the clone to clip the color rectangle (with the clone still selected, shift+leftclick the rectangle, then Object > Clip > Set)


5) result:


Since the clipping mask is a clone, you can still tweak the original form and the clipping mask will automatically follow.
More info on cloning in Tavmjong's manual, chapter Clones, and on clipping in Tavmjong's manual, chapter Clipping.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme