|
From: John H. <jdh...@ac...> - 2004-05-04 18:55:48
|
I factored matplotlib.text.Text instances and layouts out of the
backends. Now matplotlib.text.Text does all the layout and passes the
backends a *string* plus font properties etc. This simplifies the
text handling on the backends considerably, which only need to know
how to compute the width and height of an unrotated string. The
frontend will then do the proper alignment for rotated text.
The benefits of these changes are
* simpler backends
* arbitrary rotated text layout works in agg, gd, and PS
* this lays the ground work for newline spearated text across
backends since the layout will be on the front and the frontend
can pass the backends newline split strings to render.
* the backend draw_text method is now is consistent with other
backend methods, eg draw_lines, draw_rectangles. That is, the
backends no nothing about matplotlib.Artists
KNOWN BUGS
* vertical text problem in PS to be fixed
This was a pretty comprehensive change so I recommend syncing your CVS
tree.
Todd, I needed Numeric.Matrix to do the linear algebra for the
rotations in the text module text. Is there a numarray equivalent
that we can expose in numerix?
Paul, I committed these changes after synching with your new font
caching and there doesn't appear to be any problem; miraculously CVS
seems to be working pretty well. I did some additional caching of AFM
instances in backend_ps. You might want to rerun your ps profile
script and see if the numbers improve further still.
JDH
|