Skip to content

Instantly share code, notes, and snippets.

@StevenJL
Last active March 26, 2016 04:42
Show Gist options
  • Save StevenJL/3ca6b7353175a1cbe953 to your computer and use it in GitHub Desktop.
Save StevenJL/3ca6b7353175a1cbe953 to your computer and use it in GitHub Desktop.
<svg> // The <svg> tag creates the canvas for svg elements
<g transform="translate(100,50)"> // The <g> is used to group elements. We can now move the circle and label together.
<circle cy="100" cx="200" r="30"></circle>
<text> The label for the circle</text>
</g>
<rect x="410" y="200" height="25" width="25"></rect>
// Use path svg elements to drag squiggly lines.
// You certainly don't want to do these manually.
<path style="fill:none;stroke:gray;stroke-width:4px;" d="M 10,60 40,30 50,50 60,30 70,80" transform="translate(0,0)" />
<path style="fill:black;stroke:gray;stroke-width:4px;" d="M 10,60 40,30 50,50 60,30 70,80" transform="translate(0,100)" />
<path style="fill:none;stroke:gray;stroke-width:4px;" d="M 10,60 40,30 50,50 60,30 70,80Z" transform="translate(0,200)" />
<path style="fill:black;stroke:gray;stroke-width:4px;" d="M 10,60 40,30 50,50 60,30 70,80Z" transform="translate(0,300)" />
</svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment