Skip to content

Instantly share code, notes, and snippets.

View gfx's full-sized avatar

FUJI Goro gfx

View GitHub Profile
@abicky
abicky / canvas_get_transform.js
Created July 23, 2012 18:50
Simple implementation of CanvasRenderingContext2D#getTransform (getTransform for HTML5 Canvas API)
/**
* Copyright 2012- Takeshi Arabiki
* License: MIT License (http://opensource.org/licenses/MIT)
*/
(function() {
CanvasRenderingContext2D.prototype._transform = [1, 0, 0, 1, 0, 0];
CanvasRenderingContext2D.prototype._transforms = [];
CanvasRenderingContext2D.prototype.getTransform = function() {