Created
November 21, 2013 17:54
-
-
Save tanraya/7586312 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// With SVG.js | |
var width = 500 | |
var height = 20 | |
var lineHeight = 3 | |
var step = 10 | |
var draw = SVG('canvas') | |
var rect = draw.rect(width, height).fill('#f09') | |
for (var i = 1; i < width/step; i++) { | |
var x1 = i * step | |
var y1 = -step | |
var x2 = i * step | |
var y2 = lineHeight | |
draw.line(x1, y1, x2, y2).stroke({ width: 1, color: '#000' }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment