On Tue, May 11, 2010 at 11:55:29PM -0500, Maurice LeBrun wrote:
> 
> I agree, xor mode sucks big time (due to the line occasionally becoming
> invisible).
> 
> On a recent project, I implemented a plot overlay capability for drawing a
> ruler between two interactively selected points, with coordinates plotted in
> world coordinates.  The basic flow was as follows:
> 
> - set up all the event bindings to have the facility act as desired
> - every time the mouse moves:
>  o force an expose event.. this blits the backing pixmap to the screen
>  o turn off plot buffer & backing pixmap writing
>  o draw your desired overlay & register it with your redraw facility (you must
>    commandeer redraw for this to work)
>  o turn back on plot buffer & backing pixmap writing
> - restore original bindings when custom drawing mode is terminated
> 
> The turning off of the plot buffer & backing pixmap writing requires some
> rather evil direct manipulation of the contents of the PLStream and XwDev
> structs.. an API for this would be hugely better.  As well as a demo.  One can
> dream.. anyway maybe some food for thought.

I quite like this approach as it is more general than my idea for 
specifically dealing with selection rectangles. Any chance you could 
share your code for this?

Andrew

------------------------------------------------------------------------------

_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to