Multi-level Pens

A Multi-level Pen is any Pen object defined on more than one level (any levels between 0 and 63). Each level can have a different style, thickness, etc.

Multi-level Pens are useful in depicting major roads as drawn in a road atlas. The convention for this is to depict it as a thick red line bordered in black. This may be thought of as a very thick black line, with a thinner red line running along the centre.

To create it level 0 is given a width of 2 mm, coloured black with level 1 set to 1mm and coloured red. This would display as a 1mm red line, bordered by a 0.5mm black line on each side.

Because the wide black line is drawn first (level 0), followed by the thinner red line (level 1), junctions will automatically display correctly.

The JSON for each of these pens is:

{"Pen":[{"Pen":{"Colour":{"RGBA":[0,0,0,0]},"Width":200,"LineCap":"Round","LineJoin":"Round"}},
{"Pen":{"Colour":{"RGBA":[255,0,0,0]},"Width":100,"LineCap":"Round","LineJoin":"Round"}}]}

TIP: See also Multi-level Pens for more examples.

Related Topics Link IconRelated Topics