forfan
June 15th, 2004, 11:39 PM
I am newbie to GDI.
I am just doing a project which need to measure the distance
of two points in a certain image.
While, I got three problems here:
1,
this is really an boring problem.
I made a dialog to show image, and also made a status bar
in the bottom of the dialog. The status bar is used to trace
mouse position, say, its content is something like this: "X: nnn, y: mmm" . But when image is zoom out, the range of image is not
equal to the range of dialog. Then when mouse moves out of
the image, the status bar still traces the mouse. As shown in the attach image file. How can I catch the range of image?
2,
I want to show the scale ruler arround the image dialog. How can
I do it? As shown in the attach image file.
Moreover, I want to draw scale ruler on the image. somethig like this: |_1:100__|. How to do? :-(
3, Is there some demo for transforming values between different
length units? for example: CM,M,MM,INCH,FEET,PIXEL.
I think that to do this should first obtain the DPI of the display.
while, how to get the DPI of a certain display?
Sorry for so many problems, I really need your help.
Thanks in advance.
I am just doing a project which need to measure the distance
of two points in a certain image.
While, I got three problems here:
1,
this is really an boring problem.
I made a dialog to show image, and also made a status bar
in the bottom of the dialog. The status bar is used to trace
mouse position, say, its content is something like this: "X: nnn, y: mmm" . But when image is zoom out, the range of image is not
equal to the range of dialog. Then when mouse moves out of
the image, the status bar still traces the mouse. As shown in the attach image file. How can I catch the range of image?
2,
I want to show the scale ruler arround the image dialog. How can
I do it? As shown in the attach image file.
Moreover, I want to draw scale ruler on the image. somethig like this: |_1:100__|. How to do? :-(
3, Is there some demo for transforming values between different
length units? for example: CM,M,MM,INCH,FEET,PIXEL.
I think that to do this should first obtain the DPI of the display.
while, how to get the DPI of a certain display?
Sorry for so many problems, I really need your help.
Thanks in advance.