nwmark$2007042 nwmark 02/12/2007 :: 16:37
Registered
| | Im drawing a line using the following line of code which is in the mouseup event of the oGDViewer control.
oGdPicture.DrawLine(StartX, StartY, e.x, e.y, 10, oGdPicture.ColorGetARGBValueFromARGB(255, 255, 0, 0), True)
StartX, StartY are taken from the MouseDown event.
My problem is that the line doesnt appear where i click, its always to the left and if the image is scrollable (i.e. image bigger than the control) then the line is usually longer than it should be. If i fit the image to the size of the control using zoommode 2 then the line is shorter than it should be.
I presume it something to do with im taking the co-ordinates from the control, but its drawing the line at those co-ordinate on the image file so they dont match.
Any Ideas how i can get the line to appear where i click?
Cheers
Mark | |