Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Noufal123  
#1 Posted : Thursday, December 9, 2010 8:04:48 PM(UTC)
Noufal123

Rank: Advanced Member

Groups: Member
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 ...
Dmitry.Obukhov  
#2 Posted : Monday, December 13, 2010 12:37:31 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups:
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.
Users browsing this topic
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.