punbho General User

Joined: 24 Feb 2009 Posts: 8
|
Posted: Mon Apr 06, 2009 9:14 am Post subject: Drawing a rectangle at a point specified by mouse click |
|
|
Here, i want that if I clicked on someplace in the document then a rectangle should be drawn at the position of a particular size. Now I know how to handle the mouse clicks and how to draw the rectangle also.
But the problem is that when I try to draw the rectangle using the coordinates returned by the event handler evt.X and evt.Y, then the rectangle is drawn at some other location. This means that the coordinate system of both are different.
The language I am using is Openoffice Basic
Can anyone tell me how to find a mapping between the coordinates such that when I click on someplace then the rectangle should be drawn at that place only. |
|