LEADTOOLS WPF and Silverlight (Leadtools.Windows.Controls assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
PointFromImageCoordinates Method
See Also 
Leadtools.Windows.Controls Namespace > ImageViewer Class : PointFromImageCoordinates Method



point
The source point in image coordinates.
point
The source point in image coordinates.
Converts a point from image to control (display) coordinates. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
Public Overridable Function PointFromImageCoordinates( _
   ByVal point As Point _
) As Point
Visual Basic (Usage)Copy Code
Dim instance As ImageViewer
Dim point As Point
Dim value As Point
 
value = instance.PointFromImageCoordinates(point)
C# 
public virtual Point PointFromImageCoordinates( 
   Point point
)
C++/CLI 
public:
virtual Point PointFromImageCoordinates( 
   Point point
) 

Parameters

point
The source point in image coordinates.

Return Value

A System.Windows.Point that contains the converted values in control (display) coordinates.

Example

For C#/VB examples, refer to PointToImageCoordinates.

Remarks

The viewer control contain many properties that control how the image will be displayed on the surface of the control. At any time, you might require to convert a point or a rectangle from control (where it is on the surface of the control) to image (the pixel x and y value in the image data) and vice versa.

Use PointToImageCoordinates to convert a point from control to image coordinates, use PointFromImageCoordinates to convert a point from image to control coordinates. Use BoundsToImageCoordinates to convert a rectangle value from control to image coordinates and BoundsFromImageCoordinates to convert a rectangle value from image to control coordinates.

Note that when using the RasterImageBox and RasterImageViewer controls to display a LEADTOOLS Leadtools.RasterImage object, the image coordinates are assumed to be in top-left view perspective. If the image contains a RasterImage.ViewPerspective value other than RasterViewPerspective.TopLeft you must call RasterImage.PointToImage or RasterImage.RectangleToImage to further convert the values to actual rows and columns pixel values in the image.

Requirements

Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also