ImageGear .NET
transformPagePointToWindow Method

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

Parameters

imagePoint
The image point to transform into window coordinates. The units for the point must be pixels, with the origin at the top left corner of the image, 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 image and it will operate as expected.
constrainResultToWindow
If you provide this parameter, and set it to true, this function will constain the resulting point to lie within the bounds of the viewer.

Return Value

The window point that lies in the same location as the given image 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 viewer if you do not set constrainResultToWindow to true.
Remarks

This function will transform the location of a point on the image to window 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 viewer by setting the constrainResultToWindow parameter to true, otherwise the result may lie outside the viewer bounds..

See Also

Reference

ImageGear.Web.UI Namespace Client API~ImageGear.Web.UI.PageView
PageView Members

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback