resolution

AndEngine - Sprites are not getting scaled on different devices

不想你离开。 提交于 2019-12-10 11:19:37
问题 Code : This is how m initializing camera. I', trying to get resolution of device and based on that i set camera width and height. public class GameActivity extends SimpleBaseGameActivity { private SmoothCamera mCamera; private DisplayMetrics dM; private int CAMERA_WIDTH, CAMERA_HEIGHT; private double ScreenWidth, ScreenHeight, resolutionRatio; public EngineOptions onCreateEngineOptions() { //set Camera getDeviceResolution(); setCamera(); EngineOptions options = new EngineOptions(true,

different screen sizes with corona sdk

无人久伴 提交于 2019-12-10 11:11:39
问题 I am making my first iphone game using corona sdk and would like it to run on as many devices as possible (phones + tablets). However I am not sure how to deal with different screen sizes and resolutions. I developed my game for the iPhone 5 using corona simulator and it works fine on that device. When I tried it on lower resolution devices like the iPhone 4 I get 2 black rectangles on each side. I tried creating 2 different backgrounds with different resolutions and added this in my config

Drawables for qHD resolution

*爱你&永不变心* 提交于 2019-12-10 10:45:35
问题 I'm designing a game possibly for all kinds of Android devices, so I have multiple drawable folders for phones of different resolutions, and for tablets. Here is the list of my folders: drawable-mdpi - for 480x320 devices drawable-hdpi - for 800x480 and 854x480 devices drawable-large-hdpi - for 1024x600 tablets drawable-xlarge-mdpi - for 1200x800 tablets My question is what name should have a folder with drawables for qHD resolution, which is 960x540 and 256 dpi? Thanks in advance. 回答1: I

Zoom website depending on monitor resolution?

跟風遠走 提交于 2019-12-10 10:39:12
问题 I'm looking for a javascript to change the zoom of the website depending on the viwewers screen resolution. I made the website on my desktop with 1920x1080p :/ html { -moz-transform: scale(0.75, 0.75); zoom: 0.75; zoom: 75%; } I got this in my css to zoom the website to my liking for MacBook (1280 x 800). However I have no idea how to enable/disable it using javascript (if its possible?) and how to detect the resolution. Any help is appriciated! :) 回答1: Try this: @media(max-device-width

Android conditional layouts for phones:tablets

别来无恙 提交于 2019-12-10 09:36:49
问题 I am making an app that is readily available and MOSTLY used on phones, but would be CONVENIENT to use on a tablet if available. I am familiar with landscape/portrait layouts for the separate XML files, but what about for the different resolutions? This is also an issue for phone-only applications, what is the best way to have scalable layouts. I use the dip values which are density independent but not as effective as just using percentages that will scale your layout effectively. I also

Finding closest larger resolution with nearest aspect ratio in an array of resolutions

扶醉桌前 提交于 2019-12-10 09:31:57
问题 I have an array: $resolutions = array( '480x640', '480x800', '640x480', '640x960', '800x1280', '2048x1536' ); I want to retrieve closest larger value with the nearest aspect ratio (same orientation). So, in case of $needle = '768x1280' - 800x1280 . And, in case of $needle = '320x240' - 640x480 . While the closest here is 480x640 it shouldn't be matched, because its aspect ratio differs too much. So on, and so forth. Purpose: I have a set of images with resolutions as specified in $resolutions

Prolog is vs = with lists

与世无争的帅哥 提交于 2019-12-10 01:52:27
问题 Why does this fail L is [1,2,3,4] , and this works: L = [1,2,3] ? But L is 1 , and L = 1 both work the same. 回答1: is should only be used when evaluating arithmetic operations on the right-hand side. i.e.: X is 1 + 2 + 3 is/2 evaluates the right-hand structure as an arithmetic expression. If it is not a valid arithmetic expression or a number, is/2 fails. Otherwise, the number to which the arithmetic expression evaluted is unified with the [presumably] unbound left-hand value. 来源: https:/

Scaling canvas element with static resolution

纵然是瞬间 提交于 2019-12-10 01:21:19
问题 I have canvas element and I want to scale it down, but without changing it's js logic. Drawing space in js should always be 600x300px, even if it is displayed in HTML as 300x150px. I know, I can resize image with static resolution, but can I do the same with canvas? 回答1: Changing the size using CSS scales it Live Demo So basically you set its size for drawing objects, etc, via the width and height properties like so var canvas = document.getElementById("canvas"), ctx = canvas.getContext("2d")

is canvas in android proportional on different devices

末鹿安然 提交于 2019-12-08 22:33:51
问题 I am trying to make an app using canvas and a surfaceview, and I am worrying that in the future I would have many problems with it because I am not sure if the canvas is proportional with every device. currently I can only use my emulator since my phone's usb cable doesn't work(I know.. I have to get a new one..). anyways, i would like to know if the canvas would transfer my coordinates and make everything proportional, what I mean by that is that if i have something in point a, lets say (10,

What is the proper way to handle hi-res web images for hi-res displays (mainly iOS retina displays)?

我的梦境 提交于 2019-12-08 16:45:58
问题 I have a mobile website taking advantage of jQuery Mobile, however the images, frankly, look like crap on the iPhone 4/4S. I assume the same will go for the "new iPad" when it is available later this week. I know this has something to do with the pixel ratio and/or image DPI (or PPI or whatever you want to call it... let's not get into a discussion about that). I simply want to know what is the best method for serving hi-resolution web images for these iOS retina displays. At first, I thought