Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Pixel problem
05-23-2008, 03:33 PM #1
- Join Date
- Jul 2006
- Thanked 0 Times in 0 Posts
Its a little bit unique. I have a flash program that draws a rectangle. But the problem is, whenever I change a monitor, the size is inconsistent. Let me explain a little bit, So what I am actually doing is drawing a rectangle 37.8 X 37.8 Px. Which is equivalent to 1(one) cm. So what I do is, I simply take a ruler and measure the size of the shape (this is the objective of the program - to draw a shape 1cm X1cm in reality). I want the shape size to be consistent regardless of the monitor. Is there a workaround?
The only way "I" can think is to put an image of size 1cm X 1cm. And then use scaleTO() method to manipulate the size.
05-23-2008, 05:26 PM #2
- Join Date
- Dec 2004
- In a place far, far away...
- Thanked 1,043 Times in 1,019 Posts
How did you figure out 37.8px x 37.8px was the equivalent to one cm?
The most common dpi is 72 meaning 72 pixels per inch. 1cm = 0.393700787 inch
Multiply that times 72 and you get the number pixels per cm roughly.
So 28.3px X 28.3px would be about the number of pixels in 1cm x 1cm.
According to photoshop there are 28px in 1cm.