Hi All
Having looked at this a bit I think the 3d text routines ignore
whatever device units per mm have been set and must work in device
units only. Whereas standard rotated text honours the mm dimensions of
the device. It wouldn't surprise me if there was a good reason for
this, but I can't quite work it out.

To make the two compatible I have made the driver claim to be square
in both device units and mm and then the driver corrects for this in
its text render routine. It's a bit of a fudge, but it does the job.
In the future we should probably either make the two consistent or
remove the ability to set different device units per mm in the x and y
directions.

Alan - you'll be glad to know that this fixes three of the bugs on the
list regarding text rendering. So progress!

Phil


On 26 August 2015 at 11:02, Phil Rosenberg <p.d.rosenb...@gmail.com> wrote:
> Hi All
> I think I have found some inconsistencies in  the plplot rotated text
> text routines.
>
> I am trying to get the 3d text correct in the wxWidgets driver in x28.
> It dawned on my that the driver reports the size in device units as
> the maximum int in both directions - i.e. square. So I applied a
> correction to the rotation and shear to account for the actual aspect
> ration and suddenly all the 3d text looked perfect. Even better when
> the aspect ratio changed, the text also changed to match giving
> perfect resizable windows. I was very pleased.
>
> The I tested example 4 and found that the in plot text was no longer
> parallel with the line. I was less pleased.
>
> Tracing through c_plptex I realised that the device units per mm have
> been set bythe driver to reflect the actual aspect ratio. So xpmm is
> 156.1 and ypmm is 221.6.
>
> I therefore think that the 3d text and the standard rotated text are
> calculated in different unit spaces. One in mm which honours the
> aspect ratio and one in device units which assumes a square.
>
> I'm not sure what to do about this. Does anyone know any other drivers
> which report sizes in this way or am I being an idiot for trying to do
> this - (if I am then we should replace xpmm and ypmm with a single
> dupmm to stop it happening to anyone else). I actually rather like the
> fact that by telling plplot the page is square I can get the text to
> adjust to aspect ratio changes, but it will probably break the replot
> function if it uses a different driver that doesn't do this.
>
> I could try to make the 3d and standard rotated text consistent, but
> I'm not sure which is "right".
>
> Any suggestions would be very welcome right now before I start making
> decisions based on wxWidgets requirements.
>
> Phil

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to