On Mon, Apr 20, 2009 at 4:11 PM, Alan W. Irwin
<ir...@beluga.phys.uvic.ca> wrote:
> ext-cairo-test.c was written by Hazen a year ago. It builds without issues,
> but it also demonstrates there is an important bug with the extcairo device.
> No text appears in the test.ps result, and there is a status code of 127
> returned by ext-cairo-test. Hazen, the bugfix is not release critical
> because extcairo is turned off by default, but if you find the fix before
> the release, you should also turn on extcairo by default. Also, once the fix
> has been implemented an upgraded demo using a lot more of the plotting
> capabilities of PLplot would be nice.
The attached patch should fix the extcairo text rendering bug. The
issue is/was that there was some extcairo-specific code which had not
been updated for the next text rendering system. With this patch the
extcairo driver now falls back on the plD_esc_cairo for any
non-extcairo specific cases, similar to what is done for the xcairo
driver.
If this works for others as well I would be quite happy to see the
extcairo driver turned on by default. I have found it quite useful in
my own projects.
Hez
--
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science
diff --git a/drivers/cairo.c b/drivers/cairo.c
index 2587d66..5896f62 100644
--- a/drivers/cairo.c
+++ b/drivers/cairo.c
@@ -2026,12 +2026,6 @@ void plD_esc_extcairo(PLStream *pls, PLINT op, void *ptr)
switch(op)
{
- case PLESC_FILL: /* filled polygon */
- filled_polygon(pls, pls->dev_x, pls->dev_y, pls->dev_npts);
- break;
- case PLESC_HAS_TEXT: /* render text */
- proc_str(pls, (EscText *) ptr);
- break;
case PLESC_DEVINIT: /* Set external context */
aStream->cairoContext = (cairo_t *)ptr;
/* Set graphics aliasing */
@@ -2044,6 +2038,9 @@ void plD_esc_extcairo(PLStream *pls, PLINT op, void *ptr)
Cairo does not provide a way to query the dimensions of a context? */
break;
+ default: /* Fall back on default Cairo actions */
+ plD_esc_cairo(pls, op, ptr);
+ break;
}
}
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel