How to measure distances in the Graphics Device ?

  • Thread starter Thread starter Anand Ganesh
  • Start date Start date
A

Anand Ganesh

Hi All,

I have an image which is made to fit in a Window. The user can Zoom In or
Zoom Out and Pan the image.

These images are Engineering drawings which has been drawn to scale say 1
inch = 40 feet.

Now I want to provide a tool for the user where he/she can measure the
distance.

My problem is how to convert the pixel measurements into feet information.

Say my original image is of size 3000 x 2000 pixels, I am drawing it on a
client window of size 500 x 400 pixels.

Now using these how will I calculate the distance of a particular portion of
the image?

Any suggestions please? Is there any easy way I can acheive this?

Thanks for your time.

Regards
Anand Ganesh
 
Sure,

I will remember the factors. But my doubt is do I have to use the Graphics
Device Resolution values in my measurements? Will that affect? To how much
extent?

Thanks
Anand Ganesh
 
Back
Top