ScaleMode issue with StageOrientation.PORTRAIT
Closed this issue · 2 comments
Recently, I'm using black-engine on a portrait layout page, and I think I found a issue.
The example code is here.
example 1
Black.stage.scaleMode = StageScaleMode.LETTERBOX
Black.stage.setSize(750, 1500)
Black.stage.orientation = StageOrientation.PORTRAIT
When I am using setSize(750, 1500)
and StageOrientation.PORTRAIT
, black-engine returns following to me:
But, I should be:
What is the problem? 750x1500 is a size that should fit PORTRAIT layout obviously, but It didn't work as expected.
example 2
As I mentioned in example 1, black-engine seems doing something wrong. I have to use setSize(1500, 750)
(swap width and height) in order to make it work.
Black.stage.scaleMode = StageScaleMode.LETTERBOX
Black.stage.setSize(1500, 750)
Black.stage.orientation = StageOrientation.PORTRAIT
It returns the right result:
But it shouldn't return the right result. Because 1500x750 is a size that fits LANDSCAPE layout. It didn't work as expected.
Is it an issue?
I dont think its a issue.
But i agree that we need an extra tutorial about multi resolution and stage size modes.
Let me know if you have any suggestions
When I want to have a stage which is 750x1500
and is portrait. I have to write:
Black.stage.setSize(1500, 750)
Black.stage.orientation = StageOrientation.PORTRAIT
I think this is violating the mortal intuition.
A better way for portrait layout, maybe:
Black.stage.setSize(750, 1500)
Black.stage.orientation = StageOrientation.PORTRAIT
A better way for landscape layout, maybe:
Black.stage.setSize(1500, 750)
Black.stage.orientation = StageOrientation.LANDSCAPE
What do you make of it?