Reputation: 25
I need method which works like addImage
, but only for a canvas context.
How can I add an image from one canvas context to another canvas context?
Upvotes: 0
Views: 428
Reputation: 63812
You can use ctx.drawImage
with another canvas as the argument (or a <video>
even)
The syntax is just ctx.drawImage(someCanvas, 0, 0)
You can even draw one canvas onto itself, which can be useful for drawing overviews or minimaps.
Upvotes: 2