473,387 Members | 3,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to measure distances in the Graphics Device ?

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
Nov 15 '05 #1
1 2133

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

"Jack Hanebach" <ha******@suscom.spamfilter.net> wrote in message
news:eK**************@TK2MSFTNGP09.phx.gbl...
"Anand Ganesh" <an**********@hotmail.com> wrote in message
news:Oc**************@TK2MSFTNGP12.phx.gbl...
But the real problem is where is you get or how you compute the Horizontal or Vertical Scale?


When you draw the picture you scale it to fit the window, don't you. Just
remember the factor(s)...

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jayne Wolps | last post by:
Hello I wonder if anyone can help. I would like to know how certain sites: http://aboutbritain.com/ArundelCastle.htm, and http://travel.knowhere.co.uk/place/+bristol-0/ manage to put approx...
12
by: Sanjay | last post by:
hi, We are currently porting our project from VB6 to VB .NET. Earlier we used to make scale transformations on objects like pictureBox , forms etc.Now Such transformations are made on the...
13
by: Chiller | last post by:
I'm now getting close to finishing my Distance class. In the code below I have included a number of overload operators that test for equality etc. I've also added more code in the TEST_DISTANCE...
4
by: Peter Oliphant | last post by:
There doesn't seem to be any documentation on how to create and/or use an instance of System::Drawing::Graphics. On-line MSDN talks about this class, and says: " The Graphics class provides...
1
by: Benny Raymond | last post by:
I've seen both used... FromHwnd can be called like this FromHwnd(this.Handle). FromHdc needs a call to User32.GetWindowDC(this.Handle) - so my assumption is that FromHwnd is better because it's...
1
by: Frijoles | last post by:
Hello, I have a function that accepts an Image as the input. Currently, I load a bitmap in the calling class and pass that in. I'd like to create an overlay with another image and then pass the...
1
by: not_a_commie | last post by:
I recognize that the need for this spells a serious flaw in the program design, but I need to copy a portion out of a Graphics object and put that into an Image object. How do I do it generically?...
6
by: active | last post by:
I have an image and a graphics object created (FromImage) from that image. I need to create a new image and create a new graphics object from the new image. I want the new graphics object have...
9
by: koschwitz | last post by:
Hi, I hope you guys can help me make this simple application work. I'm trying to create a form displaying 3 circles, which independently change colors 3 times after a random time period has...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.