All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Hello, I'm trying to find the Parent container of CurrentBitmap inside of CanvasElement.
I want to ignore the current zoom and window location of the image for a custom control's mouse position relative to the image. Any help would be appreciated. Thank you.
private
void
CanvasElement_MouseMove(
object
sender, MouseEventArgs e)
{
var canvasElement = radImageEditor1.ImageEditorElement.CanvasElement;
float
x = Math.Abs(canvasElement.ControlBoundingRectangle.X - e.X) * 1f / radImageEditor1.ImageEditorElement.ZoomFactor.Width;
y = Math.Abs(canvasElement.ControlBoundingRectangle.Y - e.Y) * 1f / radImageEditor1.ImageEditorElement.ZoomFactor.Height;
PointF positioInImage =
new
PointF(x, y);
Console.WriteLine(positioInImage);
}