Rank: Advanced Member
Groups: Guest
Joined: 3/29/2010(UTC) Posts: 81
Thanks: 10 times
|
Hello... When i am clicking on raBitmapviewer with mouse, i have to get the point "(x,y)" from image (which is loaded in the Bitmapviewer)at clicked position ..Is it possible? pls help me ...
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello, Please use MouseEvent handler: Code:
private void bitmapViewMainView_MouseMove(System.Object sender, System.Windows.Forms.MouseEventArgs e)
{
if (!bitmapViewer1.Bitmap.IsEmpty)
{
PointF bitmapPoint = bitmapViewer1.ControlToWorkspace(new Point(e.X, e.Y), Aurigma.GraphicsMill.Unit.Pixel);
if ((bitmapPoint.X >= 0 && bitmapPoint.Y >= 0) && (bitmapPoint.X < bitmapViewer1.Bitmap.Width && bitmapPoint.Y < bitmapViewer1.Bitmap.Height))
{
label1.Text = "(" + bitmapPoint.X.ToString() + "," + bitmapPoint.Y.ToString() + ")";
return;
}
}
}
|
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.