HTML and CSS Reference
In-Depth Information
context.translate(x+.5*videoWidth, y+.5*videoHeight);
context.rotate(angleInRadians);
//****
context.drawImage(videoElement ,-.5*videoWidth, -.5*videoHeight);
//*** restore screen
context.restore();
rotation++;
//***
}
Figure 6-9 shows what the video will look like when rotating on the canvas. You can
see the full code for this in Example 6-9 .
Figure 6-9. Canvas video rotation
 
Search WWH ::




Custom Search