tags:

views:

32

answers:

1

Is there a way to let a line, polygon,... , looks like it has been scribbled or hand drawn?

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt;
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"&gt;
    <line x1="10" y1="20" x2="200" y2="300" style="stroke:rgb(99,99,99);stroke-width:2"/>
</svg>
+1  A: 

Sure, break the line into several lines (or use a path with as many segments as you want). It should be fairly trivial to write a script that adds a bit of randomness to the points in each path segment. Another way is to use svg filters, see this example (more context and further examples available here).

Erik Dahlström