> On Jan 14, 2015, at 11:32 AM, Phil Rosenberg <p.d.rosenb...@gmail.com> wrote:
> 
> This slightly breaks the chain, but Jim just sent me a patch for adding 
> colourmaps to the buffer. These include a call to plP_state at the end just 
> as in plscmap#. My question is, what should a drivers respons be to such a 
> change mid plot? Currently in wxWidgets the background colour will change 
> immediately, but the current colour will remain until a call to plcol#. I 
> just wanted to check everyone thought this was sensible? ( I think it 
> probably is)
> 
I always found the calls to plP_state to be a kludge, but they are necessary 
for things to work. 

The thing to remember is that when the buffer is read back the sequence of 
commands is not arbitrary. The color map, for example, will occur in the same 
sequence as when the plot was generated. Unless the original program changed 
the color map mid plot, it will not occur on buffer play back. I guess it is 
possible for some to create a metafile that has a color map change mid plot. 

The buffer playback I think is used in two ways:  Some drivers use it to redraw 
the plot when a window is resized and it is used to print a plot by some GUI 
drivers. 

> 
> Yes, that is my thought - the plbuf.c code and the plstream buffer being that 
> higher level. In fact I have just written some quick and dirty code to dump 
> some examples to file for my testing with wxWidget (which is where we 
> started). Things mostly work quite well. The colour maps are an issue, but I 
> will test the fix Jim sent me for this. Text is also a problem. In particular 
> if a driver doesn't support text then Hershey text is saved to the buffer, if 
> Unicode text is saved to the buffer and a driver which doesn't support text 
> reads it then that text is discarded. Does anyone know if plP_text can cope 
> with a Unicode text string? That would be an easy fix for the latter.

I don't think it would be difficult to store the text as a string in the plot 
buffer (I was planning on doing it this way). This may be in lieu of or in 
addition to the raster version. It may already do it now--I don't have the code 
in front of me. 

> Another text problem (maybe affects other things as well) is that text which 
> is placed on a gradient using plptex, no longer knows the aspect ratio of the 
> viewport, so if that aspect ratio is different then the text will not be at 
> the correct angle. This is rather more complex to fix and is something that I 
> think affects the interactive drivers now too (if resizing their window 
> allows the aspect ratio to change - which is true for wxWidgets at least).
> 
I will check to see what it would take to capture appropriate state data.  
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to