Hello,

I've just checked in a branch labeled hbabcock in which I have been  
exploring how to make it easier (from the perspective of the device  
driver writer) to handle drawing your own text. It also attempts to  
factor out a lot of what is common from driver to driver in terms of  
text handling. The approach I've taken is to add 4 new functions to  
the PLplot dispatch table, expand the EscText structure slightly and  
add a new_unicode flag to the plot stream.  Also, plcore.c has been  
changed to include these 4 functions and call them as appropriate  
from plP_text().

The functions are:
plD_textbgn - Called at the start of the processing of a text string  
by plP_text(). The driver should do what ever it needs to do to get  
ready to process a string.
plD_textchr - Called by plP_text(), specifies the next character to  
add to the text to be displayed.
plD_textesc - Called by plP_text(), specifies whether to change font,  
or go to superscript or subscript at the current position in the string.
plD_textend - Called by plP_text() at the end of the string. When  
this is called the driver should display the string (if it has not  
been doing this character by character).

This approach is only implemented for the xcairo driver so if you are  
interested you should look at how these functions are defined in  
cairo.c and compare them to proc_str(). It should not effect any of  
the other drivers, except Qt which complains about my mangling of  
disptab.h.

Does this seem like a reasonable approach?

best,
-Hazen


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to