canvas cut out a rectangle
Hello,
I work with canvas
-
ctx = canvas.getContext("2d");
and I am very satisfied with it, but now I have a special problem.
On my canvas I have a x and y scale and lines.
Now I will cut out an area of the canvas (e.g. x = 20, y = 30, width=100, height= 40) and draw the cutted area in the size of the original area.
So my question is, is it possible to cut out an area of the canvas (or context respectively) and to scale it like the original context, and when yes, what functions should I use?
Thanks for your help,
Michael