Skip to content

Instantly share code, notes, and snippets.

@fengb
Created June 29, 2017 14:36
Show Gist options
  • Save fengb/e5a0dd74c41f39c745de0a84f4f038a7 to your computer and use it in GitHub Desktop.
Save fengb/e5a0dd74c41f39c745de0a84f4f038a7 to your computer and use it in GitHub Desktop.
ctx.body = svg.render({
width: 100,
height: 100,
elements: [
svg.polyline({
points: [{ x: 1, y: 2 }, { x: 5, y: 10 }],
presentation: { stroke: "red" }
}),
svg.path({
commands: [
svg.path.moveTo({ x: 1, y: 1 }),
svg.path.lineTo({ x: 20, y: 1 }),
svg.path.lineTo({ x: 40, y: 40 }),
svg.path.close()
]
})
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment