Re: drag objects (polygon) to desired position
Bryce Harrington <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Nov 14, 2014 at 09:26:48PM +0530, David Boon wrote: > Hello, > I am trying to update a simulator which uses pycairo-pygtk. I needed > to draw polygons on definite points (the user selects using mouse > pointer) on runtime. Though I am able to draw polygons I am not able > to really draw it in the desired position selected by the user. > > Is there a way to draw on specific points on screen as selected by the > user or is it possible to drag the polygon to the desired position? What you describe certainly sounds doable. Perhaps you need to translate from the mouse's coordinate system to the screens? There are lots and lots of pycairo/pygtk examples out there, so if you dig around a bit you'll probably find something similar to what you're trying to do, that can help clue you in. Otherwise, if you get really stumped post a minimum test case here showing the problem and maybe someone can take a look. Bryce -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo