View Full Version : Pixel problem

05-23-2008, 04:33 PM
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?

My thoughts:

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, 06:26 PM
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.