Skip to content

Instantly share code, notes, and snippets.

View dmester's full-sized avatar

Daniel Mester Pirttijärvi dmester

View GitHub Profile
@dmester
dmester / SvgContext.js
Created July 23, 2015 11:28
Generate identicon as svg file
/**
* A CanvasRenderingContext2D implementation containing the subset required by Jdenticon
* for generating svg files.
* @license zlib (http://opensource.org/licenses/Zlib)
* @copyright Daniel Mester Pirttijärvi 2015
* @constructor
*/
function SvgContext(width, height) {
this._svg = '<svg width="' + width + '" height="' + height +