mercredi 8 avril 2015

How to get the current pattern-object contents of a canvas-context (2D)?

(Using Firefox32, and Win7. But in other browsers I need it to work, too.)


I can't find a command to retrieve the content of the pattern-object that I set on the 2D-context.


Is there no direct way to get the value array and the width and height?


And if there is really no direct way, is there a workaround?


I could just use fillRect with the pattern on a hidden canvas and then reading out the canvas. But then, how to get the correct height and width?


Aucun commentaire:

Enregistrer un commentaire