Tipp: stroke styles in a complex black-and-white linedrawing

Share your Inkscape tricks and tutorials here.
macti
Posts: 50
Joined: Wed Mar 12, 2008 10:49 pm

Tipp: stroke styles in a complex black-and-white linedrawing

Postby macti » Fri Nov 07, 2008 5:06 pm

As a technical editor I draw black-and-white line illustrations.
Normally I use 3 different line weights: For example Thick=1.5px , middle=0.9px, thin 0.4px.

However when trying to select and change the styles globally after the drawing is finished, there is a problem.

For example, I want to select all thin lines in the drawing to change their thickness or applying some other feature on them. Typing
0.4px in the Search dialog doesn´t work however, once the drawing has been scaled. Because internally
line thickness has been changed by the transform matrix.

So here is a way that I found very helpful to get around this problem.

I create the following template.svg file:
next to my canvas I draw three lines weights: Thick, middle, thin. For each black line I change it´s color slightly.
For example instead of R=0, G=0,B=0 I change it to R=1, G=0, B=0. (For your eyes it´s still a black line).
I copy the resulting hexadecimal value in my template. Important: don´t use the last two alpha digits, the search dialog wont work (I don´t know why).

Next to the canvas of my template I do have the following entries:

-------thick
#010000

-------middle
#000100

-------thin
#000001

When I start drawing thick lines:
I click on the thick line next to the canvas, double click on the pen tool,and select "Take from selection".
Or draw lines and change their style afterwards with "Ctrl+shift+V".

When I want to select all thick lines in my drawing:
I copy the color value of the thick line #010000 next to the canvas, and insert it into the Style Box in the Search Dialog (Strg F). Don´t forget to put # in

front of the color value.

Maybe you´ll also find this workflow usefull.

Jep
Posts: 4
Joined: Fri Nov 07, 2008 12:15 am

Re: Tipp: stroke styles in a complex black-and-white linedrawing

Postby Jep » Mon Nov 10, 2008 8:57 pm

It is a trick that is useful in 2 ways to you as a pro, thx for sharing.

However, you are aware of the preferences setting 'Transformations > scale line weight' ?

I'm using a translated version so I'm not sure those are the exact words used, but it is possible to keep only your three thicknesses throughout unchanged.

Perhaps that is exactly what you do not want, just figured I'd mention.

macti
Posts: 50
Joined: Wed Mar 12, 2008 10:49 pm

Re: Tipp: stroke styles in a complex black-and-white linedrawing

Postby macti » Mon Nov 10, 2008 11:06 pm

Yes I´ve tried to keep stroke-width constant by checking "scale stroke width".

It works fine as long your drawing is not grouped. However when you work with groups and keep changing or scaling those groups a couple of times you cannot search for the original "stroke-width" in the search dialog any more. Somehow it got lost internally (seems to be a bug).
Lets say you work with 1px stroke. You group those lines together with different lines. Scale the groups a couple of times etc.
On print or on screen the 1px-lines are still 1px thick. However the original 1px strokes are not searchable as "stroke-width:1" in the search dialog anymore.
This is why I work with color values. Maybe it should be reported as a bug.
I hope my english made it clear enough what I´m trying to say.

Jep
Posts: 4
Joined: Fri Nov 07, 2008 12:15 am

Re: Tipp: stroke styles in a complex black-and-white linedrawing

Postby Jep » Tue Nov 11, 2008 12:04 am

macti wrote:[...]
I hope my english made it clear enough what I´m trying to say.

Yes, it's perfectly clear.
Then perhaps the setting at the bottom, the radio buttons 'save transformations' can make a difference?
Those apply to how Inkscape deals with scaled objects, whether or not it saves stuff with a transform: -parameter.
Looks like it's by default 'optimize' which is what it should be for your purpose.

macti
Posts: 50
Joined: Wed Mar 12, 2008 10:49 pm

Re: Tipp: stroke styles in a complex black-and-white linedrawing

Postby macti » Tue Nov 11, 2008 1:26 am

Jep: Thanks for your reply.

I tested "Store transformation" "optimized" and "Preserved" in Inkscape Preferences-Dialog.

However after a couple of times of grouping several lines with different (stroke-widths) togehter, ungrouping, grouping... and rescaling those groups I get the same dilema.
The find dialog cannot search reliable for a specific stroke-width any more.


Return to “Tricks & Tutorials”