Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Pixel problem

  1. #1
    Regular Coder
    Join Date
    Jul 2006
    Thanked 0 Times in 0 Posts

    Pixel problem

    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.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    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.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts