From: Jonathan W. <jw...@ph...> - 2008-03-05 04:25:49
|
> On Mar 4, 2008, at 9:36 PM, Jonathan Woithe wrote: > > > I am working on an application which requires plots to be displayed > > within the context of the program's windows. In practice this means > > that I needed plplot to have the ability to plot to a supplied X > > Drawable rather than to an X window which plplot creates and manages > > itself. > > How well do you think it would work to have PLplot/cairo draw into a > memory buffer which is then transfered by the library user to a X > Drawable? This seems to be more general, but perhaps plotting to X > Drawable already covers 90% of the common use cases? In terms xcairo driver users I would expect the Drawable approach to cover nearly every possibility because an X Drawable can be provided by most (if not all) X11 GUI framework. For users not utilising X the xcairo driver is not really useful anyway. > The structure for this already exists to some extent in the form of the > memcairo driver, but unfortunately this driver is not yet functional. If the memcairo driver becomes functional then perhaps that could be used instead. As you mentioned though, it doesn't work now and so isn't a viable solution at present. Having said that, I suspect there are performance advantages when using a Drawable if the ultimate destination of the image is an X display. > Also, in your patch, you need to consider the situation where the > user does not have X Windows and the related libraries installed on > their machine. Sorry, I'm not sure I understand why this is an issue or what it is you are referring to. If the user "does not have X Windows and the related libraries installed on their machine" then the cairo / xcairo drivers either won't compile or won't link at runtime. Either way they will not be useable. My patch doesn't introduce any new external dependencies that don't already exist within the xcairo driver so I'm uncertain as to what precisely it is that I need to consider. I should explicitly state here that my patch only modifies the xcairo driver. The other cairo drivers are totally unaffected. Regards jonathan |