VintaSoft Imaging .NET SDK and Plug-ins Discussions
Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.
Board index < VintaSoft Imaging < VintaSoft Imaging .NET SDK and Plug-ins Discussions
When the user clicks on the selection rectangle in the toolbar and draws a rectangle in the viewer, how do I get the X,Y coordinates of this rectangle?Version 8.3 does not have public functions for transforming coordinates from screen to viewer and viewer to image coordinate spaces.
Also is it possible to have the user double-click and point in the viewer and get the X,Y coordinates of the image in the location where they double-clicked?You need subscribe to the double click event of image viewer and get the X,Y coordinates from the event params.
$(document).on("dblclick", function (event) {
var x = event.pageX;
var y = event.pageY;
var controlPoint = imageViewer1.transformPointFromScreenToControl(x, y);
var imagePoint = imageViewer1.transformPointFromControlToImage(controlPoint.x, controlPoint.y);
var controlPoint2 = imageViewer1.transformPointFromImageToControl(imagePoint.x, imagePoint.y);
var screenPoint = imageViewer1.transformPointFromControlToScreen(controlPoint2.x, controlPoint2.y);
console.log("s: ", x, y, "-> c: ", controlPoint, "-> i: ", imagePoint);
console.log("i: ", imagePoint, "-> c: ", controlPoint2, "-> s: ", screenPoint);
});
Best regards, Alexander
One quick question, though. When I double-click, it highlights part of the web page as if I'm trying to select a large portion of the page for a copy/paste function. How would I disable that without disabling the double-click functionality?We need more info about your problem: