I am looking for a [fast] way to paint images from multiple canvases on the main canvas element.
What is the correct and the fastest way to do that?
I am looking for a [fast] way to paint images from multiple canvases on
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
drawImagemethod of Canvas can accept as first argument a Canvas object. That’s the fastest and recommended way.Here’s the extract from w3.org :
Note that your canvas elements don’t have to be added to your document. I use in memory canvas for all my buffering or sprite objects (
someSprite = document.createElement('canvas');...).