i have a collection of pattern in SVG format online. grid.kevinbock.de
now i thought it´ll be cool to paint them online and at least fill the areas with some "onclick=fill" stuff with SVG...
i couldnt find a tutorial for exactly this and wondering if u could help me how to set up the code for this...
heres an example of a grid in SVG format:
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="50%"
viewBox="0 0 800 600" preserveAspectRatio="xMidYMid slice" width="100%" height="100%" enable-background="new 0 0 800 600" xml:space="preserve">
<polygon fill="none" stroke="#000000" stroke-width="0.25" stroke-miterlimit="10" points="653.458,599.182 653.458,585.273
665.501,592.229 677.546,599.182 665.501,606.135 653.458,613.09 "/>
<polygon fill="none" stroke="#000000" stroke-width="0.25" stroke-miterlimit="10" points="653.458,571.367 653.458,557.461
665.501,564.414 677.546,571.367 665.501,578.32 653.458,585.273 "/>
<polygon fill="none" stroke="#000000" stroke-width="0.25" stroke-miterlimit="10" points="653.458,543.553 653.458,529.646
665.501,536.602 677.546,543.553 665.501,550.508 653.458,557.461 "/>
... and so on...
</svg>
further questions are: is there any possibility to get something like snapping when drawing lines in the grid? near the vector points? and is there a way to insert a "back/Undo"-Button and Save the file?