Boris Hollas
unread,May 15, 2013, 6:41:04 AM5/15/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scala...@googlegroups.com
Hello,
I use graphics2d to draw graphics. These graphics are scaled and translated with g.scale and g.translate.
Also, I have a mouse click listener. I want to click at points in the graphics. To identify the correct position, I have to take into account the scaling and translating I've done to draw the graphics. How can this be done?
listenTo(mouse.clicks)
focusable = true
reactions += {
case event.MouseClicked(_, point, _, _, _) => {
// need to scale & translate point.x, point.y to corresponding position
...
repaint
}
}