ImageGear for .NET
transformWindowPointToPage Method

Transforms a window coordinate to an image coordinate.
Syntax
ASP.NET Ajax Javascript (Specification) 
function transformWindowPointToPage( 
   windowPoint : Point,
   constrainResultToImage : Boolean
) : Point;
ASP.NET Ajax Javascript (Usage) 
var resultVar = instanceOfPageView.transformWindowPointToPage(Point,Boolean);

Parameters

windowPoint
The window point to transform into image coordinates. The units for the point must be pixels, with the origin at the top left corner of the viewer, and with positive values extending right (x) and down (y). You may provide this function with a point that lies outside the bounds of the viewer and it will operate as expected.
constrainResultToImage
If you provide this parameter, and set it to true, this function will constain the resulting point to lie within the bounds of the image.

Return Value

The image point that lies in the same location as the given window point or (0, 0) if the viewer does not have an image open. Note that this point may lie outside the bounds of the actual image if you do not set constrainResultToImage to true.
Remarks

This function will transform the location of a point on the viewer window to image coordinates. If the viewer does not have an image open, this function will return a point with the x and y values set to 0.

You can constrain the resulting point to the nearest point that lies within the bounds of the image by setting the constrainResultToImage parameter to true, otherwise the result may lie outside the image bounds..

See Also

Reference

PageView class
PageView Members

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback