On Wed, Jul 15, 2009 at 10:31 AM, Alan W. Irwin<ir...@beluga.phys.uvic.ca> wrote: > On 2009-07-15 10:48+0200 Mark de Wever wrote: >> I [...] also tested with the >> xcairo driver and it seems that when plotting rotated the text is no longer >> drawn. > > Good spotting! That is definitely a bug. > > The rest of this is a note for Hazen who is our cairo expert: > > Hazen, this cairo bug has to do with clipping of the subpage limits at the > positions of the _original_ subpages rather than the rotated ones. To > convince yourself of that try the series > > ./x01 -dev xcairo -ori 0.0 > ./x01 -dev xcairo -ori 0.05 > ./x01 -dev xcairo -ori 0.1 > ./x01 -dev xcairo -ori 0.15 > ./x01 -dev xcairo -ori 0.2 > ... > ./x01 -dev xcairo -ori 0.5 > > > (which also nicely demonstrates the long-standing parallelogram bug in the > PLplot core library, but that is beside the point here). You will see that > in all series cases, the only text output is that which is still in the > original subpage position. Of course, by the time you extend the series > to -ori 1, -ori 2, and -ori 3, none of the rotated text is in its original > (unrotated) sub_page window so all of the text is completely clipped. > > To further confirm the issue is a text clipping one, the problem disappears > if you turn off text clipping completely with -drvopt text_clipping=0 > which is a temporary workaround for the problem if you don't mind unclipped > text. > > To fully deal with this cairo issue, the proper thing to do is to implement > rotated sub-page boundary clipping limits for text. I hope that would be > fairly trivial for you?
As of now, I don't think any of Cairo, Qt or SVG properly support proper text clipping for plot rotations. The test case you mention shows similar incorrect clipping/missing text results for those devices as well. One possible fix for this is to add driver-level rotation and clipping support. Qt and Cairo should support this in a fairly straightforward manner and I think SVG would as well. If the drivers are allowed to handle the rotation and clipping then support for arbitrary plot rotations should be "free" after this is implemented. The PLplot internals could treat the plot as unrotated, leaving the rest to the plot device. Based on some short experiments with Cairo, I do not think that the driver changes would be too invasive. This may require some invasive internal PLplot changes though, so I do not know if it is something which should be done now or post-5.9.5/5.10.0 I ran in to this problem as well while working on the code for plarc. The current state of the PLplot Cairo arc support falls back on plline/plfill if the orientation is set to anything other than 0 due to this clipping issue. I thought I had posted a message to the list about this, but I don't see the message now. Hez -- Hezekiah M. Carty Graduate Research Assistant University of Maryland Department of Atmospheric and Oceanic Science ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel