Convert mm(millimeter) into pixels for use with TextOut
-
I want to draw a string in an SDI using TextOut. But i have co-ordinates in millimeters. How can i convert them into pixels. Help needed urgently...
Ups!! The pixel is the basic unit of programmable color on a display or image so it's more a logical unit than a physical one, altough the physical size of a pixel depends on how you've set the resolution for the display screen: If the display is at its maximum resolution, the physical size of a pixel will be the physical size of the dot of the display (usually .28mm but you should look to the specs of your display). If you've set the resolution to less, a pixel will be larger than the physical size of the screen's dot (the pixel will use more than one dot). Hope it helps ... Marc Soleda. ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
-
I want to draw a string in an SDI using TextOut. But i have co-ordinates in millimeters. How can i convert them into pixels. Help needed urgently...
Hi, If you call 'GetDeviceCaps' on your device context you can get the width and height, in millimeters, of your physical screen. You can also get the resolution of the screen in pixels this way, so you should be able to do some calculations based on these values... Don't think you are, know you are...