I have a vague memory that I posted some demo code to do just that in the Winston repository. Try searching there.
I'm thinking we need a "GtkExtras" package that handles at least rubberbands and hit testing. rubberbands are already implemented in ImageView, but I haven't had time to start on a general framework for hit testing. If you find a good design for this, let's start a package. --Tim On Sunday, October 05, 2014 02:28:46 AM Roger Herikstad wrote: > Hi, > Thanks for the input. I actually started working on something like that; I > was trying to figure out a way to get the limits of Winston's FramedPlot > expressed in window coordinates, so that I can use that to do the > transform. I guess this, > > bb = Winston.boundingbox(p.content1,cc) > > > should return a bounding box expressing those coordinates? Anyway, I'll > keep working on it and report back once I've found a good solution. > > On Sunday, October 5, 2014 5:22:52 PM UTC+8, Andreas Lobinger wrote: > > Winston does (as any plotting tool) a coordinate transformation to get > > from one coordinate system to another. Your gtk request returns screen (or > > window) coordinates and you need to reverse this based on the > > data-to-screen transformation to get data coordinates. Although i patched > > something into winston, i'm missing the full picture how winston does the > > coordinate transformation. I did something similar in another project and > > mathematically it's (as long as it's affine) straight forward.
