screen-resolution

Is it bad to work with pixels in CSS? [closed]

穿精又带淫゛_ 提交于 2019-11-28 16:46:55
Is it bad in terms of compatibility to use pixel numbers in CSS instead of percentages? How about lower resolutions? Is it okay to work with them in ranges of 1-100? This is a difficult question, because the answer mostly depends on your situation. Pixels are not that bad, I mostly use them too. (Sometimes even for font sizes.) I usually fix the outer block element of the layout by a given size (pixels with fixed-width layouts, and percentages with fluid layouts), and on the inside elements I usually set percentages whenever possible. There are some elements which simply can't be styled with

How to Work With Different Screen Resolutions

旧巷老猫 提交于 2019-11-28 16:11:09
I'm using Unity 4.3.3 for my game. I'm making a game for Android and iOS devices. Since I'm pretty new to unity, I can't seem to find a way to work with different screen resolution. I'm using c# for my scripts. I want my game to run full screen. I've tested it on iPad 2 and it runs perfect but for iPhone 4 the sides are clipped and for iPhone 5 they are clipped even more. What is the solution? Which option should I choose under Player Settings > iOS > OtherSettings > Target Resolution? unity changes its ingame camera to match the dimensions of the aspect ratio of the screen it's using.

Multiple screen resolutions/aspect ratios (games)

泪湿孤枕 提交于 2019-11-28 15:37:34
问题 EDIT: Thanks for all your answers and comments. After thinking about it i would rephrase the core of the question to: "How to determine and limit the minimum resolution/ratio my game is able to run on". Because imo either the game becomes unplayable on the smallest screen/ratio (lack of detail) or supporting even the smallest screen/ratio degrades the experience for all the others significantly. Besides we do not even know what the smallest resolution is or can restrict it in any way other

Most popular screen sizes/resolutions on Android phones [closed]

别等时光非礼了梦想. 提交于 2019-11-28 14:56:08
I understand that Android's developer site provides information on this topic. I have already read the following three pages: Supporting Multiple Screens Screen Sizes and Densites Icon Design Guidelines They do not give the information/statistics that I am looking for. Judging from the second link, the two most important screen categories to support are normal-hdpi and normal-mdpi . The problem is that simply knowing that these two categories are the most popular is of no help to me. The website gives me a range of screen sizes and densities that go into these categories, but the ranges are

Change screen resolution in Java

懵懂的女人 提交于 2019-11-28 14:19:10
I have a program that uses visual scripting ( sikuli-script ) to allow the users to create their own visual scripts. The program needs to work across multiple systems that could have different screen resolutions. Sikuli matches highlighted images on a pixel-by-pixel basis, so on systems with different resolutions will fail to find images. Therefore is there a way that I can change the resolution settings in windows through java code? Going full-screen is not an option as images that need to be captured come from different software packages, i.e. my software package sits above where the images

GetSystemMetrics() returns wrong value for SM_CXSCREEN

放肆的年华 提交于 2019-11-28 12:10:12
I've run into an interesting problem. At least in Vista, getSystemMetrics(SM_CXSCREEN) returns an incorrect value when the desktop DPI settings aren't set at 100%. For example, I tried 150% in a 1366x768 screen and getSystemMetrics() returns 911 instead of 1366 (and 1366 / 1.5 ~ 911) According to the MSDN, getSystemMetrics(SM_CXSCREEN) returns pixels, so I thought this value wouldn't be affected by the DPI settings - but it is. So is there a safer way to find out the true, unscaled screen resolution? A program must tell the operating system that it is DPI-aware to get the true resolution when

Android Multiscreen Support in android : 540x960 issue

空扰寡人 提交于 2019-11-28 10:26:53
My application is supporting 3 type of density ldpi (120),mdpi(160),hdpi(320) and for that we have three folder for resources (ldpi,mdpi,hdpi). But my problem is occurring in HTC sensation XE (540x960) having density ~256 dpi.and my resources is stretched. In manifest file <supports-screens android:xlargeScreens="false" /> means i am not supporting for xlarge screen so does 540x960 come in high density??. How can i overcome this problem??? Android Multiscreen Support issue says " You can also use a combination of density and size qualifiers but that still leaves some room for two different

Understanding Samsung Galaxy Tab screen density

我只是一个虾纸丫 提交于 2019-11-28 08:42:10
One would say that if the Galaxy Tab screen resolution (in portrait mode) is 600px and the screen width is 3.55inch , the screen density would be 600/3.55 = 169 dpi . Knowing that and keeping in mind the way the device independent pixels (dp) is computed ( http://developer.android.com/guide/practices/screens_support.html ): px = dp * (dpi / 160); 600 = dp * (169 / 160); dip = 568 So drawing a horizontal line of 568dp (device independent pixels) width starting at position 0 must exactly match the width of the screen. But if you try this on device you will find that the screen width is 400dp . I

Resize display resolution using python with cross platform support

巧了我就是萌 提交于 2019-11-28 08:28:57
Resize display resolution using a python function. It should be cross platform, ie support for windows, linux and mac (it is okay to have multiple cases depending on the operating system) I have code which I think works on linux (Ubuntu) I am looking for a solution for windows and mac (should support both 32 and 64 bit machines) def SetResolution(width, height): os.popen("xrandr -s "+str(width)+'x'+str(height)) I would also appreciate it if somebody could tell me how I could get the possible display resolutions for windows and mac my function on linux is this: def GetResolutions(): screen = os

How to programmatically determine native pixel resolution of Retina MacBook Pro screen on OS X?

南笙酒味 提交于 2019-11-28 04:58:36
问题 Given a CGDirectDisplayID returned from CGError error = CGGetActiveDisplayList(8, directDisplayIDs, &displayCount); for the built-in screen on a Retina MacBook Pro, I would expect to fetch the native pixel dimensions using size_t pixelWidth = CGDisplayPixelsWide(directDisplayID); size_t pixelHeight = CGDisplayPixelsHigh(directDisplayID); However, these calls only return the dimensions of the currently selected mode. If I change screen resolution I get back different values. I was looking to