That looks pretty neat: the use of context managers seems very nice.
But is "canvas" (and "HtmlCanvas") meant to refer to the HTML5 <canvas> element? If not, I can see that being a point of huge confusion.
But is "canvas" (and "HtmlCanvas") meant to refer to the HTML5 <canvas> element? If not, I can see that being a point of huge confusion.
canvas.canvas() would definitely look weird