Articles on 2D transforms

Alex Cruikshank

Alex Cruikshank

Interactivity in HTML5 Canvas Visualizations

In the last canvas visualization post I discussed the canvas API’s transform functionality and how it greatly simplifies drawing complex visualizations.  In this post, I’ll talk a little about making canvas visualizations interactive and about problems you might encounter when mixing transforms and interactivity in a canvas application. Examples: (an HTML5 compatible browser is required

Alex Cruikshank

Alex Cruikshank

Taming 2D Transforms in HTML5 Canvas

This is the second post in a series on creating custom interactive visualizations in canvas.  The first post is here. The canvas API contains five methods (rotate, scale, translate, transform, and setTransform) used to transform the drawing context. We typically use the transform API when we want to rotate or scale some element of the