actionscript 3 - Scaling for Android devices with starling causing some layout issues -


I am using multi-resolution technic number three as written in

and scale To determine the factor of the platform size, I am basically using this piece of code written by Jeff:

  if (Capabilities.screenDPI> = 200) { If (Capabilities.screenDPI> = 280) {AssetFactory .contentScaleFactor = 2; } Else {AssetFactory.contentScaleFactor = 1.5; }} And {AssetFactory.contentScaleFactor = 1; } Var mViewPort: rectangle = new rectangle (0, 0, stage. Fullscrew, stage fullscreen); MStarling = new starling (startup, stage, mvuiport); MStarling.stage.stageWidth = stage.fullScreenWidth / AssetFactory.contentScaleFactor; MStarling.stage.stageHeight = stage.fullScreenHeight / AssetFactory.contentScaleFactor;  

This technique works great When I do the test with most devices but then we have tools like Barnes and Noble Nook Color

The device has 600x1024 resolution of 170 dpi. This means that it is going to take a small property (320x480) and limit it to 600x1024. Any idea about how to achieve this issue which is pixalated?

I am also applying a test application which shows this issue in detail.

Is not the best work for me still scaling the viewport of Starling, it should always remain the base size (320x480).

Then you have a scale factor about how big the texture should be. This is a built-in feature of Starling when making a texture - what is going through the scale factor, what does it mean if your step is 640x960 then your scale factor 2 will be. Your image will be (bitmap object), it will have the actual screen size of 320x480 (fullscreen, with 1: 1 step size), but its structure (loaded asset bitmapdata) is twice as large (640x960, 1: 1 phone With size).

Easy to understand - Starling (320x480) will be extended to fit your phone's resolution (320 - & gt; 640). But your images will be shortened to fit in stage (640 -> 320). So you will get completely normal images.

This helps you to maintain a certain level of level. It is really useful, because otherwise the position of objects can be difficult - if you want to keep the object in the middle, then sometimes 160, sometimes 320, etc. This means that you always position / size with calculations Setting that overload

Hope that helps!

EDIT: I remember to just set a proportion of my main size and asset to a site:

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -