Converts a point in viewer coordinates to image coordinates.
public Point ViewerToImagePoint(
Point point,
bool accountForViewPerspective
)
Public Function ViewerToImagePoint( _
ByVal point As Point, _
ByVal accountForViewPerspective As Boolean _
) As Point
public:
Point ViewerToImagePoint(
Point point,
bool accountForViewPerspective
)
point
The point in viewer coordinates.
accountForViewPerspective
true to return the coordinates in the current Image view perspective. false to return the coordinates in top-left view perspective.
A System.Drawing.Point object containing the point coordinates.
This method converts a point from viewer (physical) to image (logical) coordinates. The viewer coordinates is what you are currently seeing on the screen. It contains the current scale and scroll values (as well as any padding if set). For example, when you use the RasterViewerInteractiveMode.UserRectangle, the value obtained from the RasterViewerRectangleEventArgs.Rectangle parameter to the InteractiveUserRectangle event is in physical coordinates. If you need to convert this value to image coordinates (for example, to use it as a region or to find the exact pixel coordinate of this rectangle in the image) then you should use the ViewerToImagePoint or ViewerToImageRectangle methods.
When accountForViewPerspective is set to true, the return point value is in the same view perspective as the current image (RasterImage.ViewPerspective) which might not be necessary in top-left coordinates. If this value is false, the return value is always in top-left coordinates.
To convert a point from image (logical) to viewer (physical) coordinates, use the ImageToViewerPoint method.
To convert a rectangle from image to viewer coordinates and back, use ImageToViewerRectangle and ViewerToImageRectangle.
For an example, refer to InteractiveUserRectangle.
Products |
Support |
Feedback: ViewerToImagePoint Method - Leadtools.WinForms |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.