CreateJS / EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
http://createjs.com/
MIT License
8.13k stars 1.97k forks source link

Is It Possible Rotate Canvas Without Device Rotation #1044

Closed skyberk closed 3 years ago

skyberk commented 4 years ago

I want to rotate canvas portrait to landscape when device orientation still portrait mode. I tried with css but it does not work. Also i managed to rotate with the code below. But it is not working well stage still drawing with portrait width height. In short i want to landscape preview when device on portrait mode. Thank you from now.

s_oStage = new createjs.Stage(canvas);
s_oStage.regX = 0;
s_oStage.regY = 800   
s_oStage.rotation =90;
danzen commented 4 years ago

You can put everything in a Container on the stage and then rotate and scale the container.