I am trying to use canvas for some basic 2d graphics stuff, and the transform functions seem to work well in firefox, doing what I expect. However, I found one shortcoming that I haven't been able to resolve (at least trivially).
After I have applied a series of transforms (via translate, scale, etc.), I get the drawing that I want. After that display, I want to be able to map a user mouse-click back into my model space, meaning I want to use the inverse of the current transform. Unfortunately, I can't find a way to 'get' the current transform. transform and setTransform return 'undefined'.
the alternatively is to implement the translate/scale funcs myself, and keep track of the current transformation myself, invert that and use it directly. But it feels like this kinda of functionality would be a common use, so I wonder: am I missing the boat here? Is there another way to map a user click back into my model space? Or should I be petitioning the specs forum to add getTransform (and get TransformInversion)?
Thanks,
ben