major text update

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

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?

No, not yet. I was thinking about adding a minimal Matrix class to the
numarray half of matplotlib.numerix for now. Then I'll add a more
full-featured Matrix class to numarray-1.0. Does that sound OK?

Todd

···

On Tue, 2004-05-04 at 14:32, John Hunter wrote:

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

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Todd Miller <jmiller@...31...>

John Hunter wrote:

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.

[snip, snip]

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.

Yes, the PS backend does appear to be about 30% faster. However, the Agg backend looks to be about 15% slower, so I guess there is a trade off here.

···

--
Paul Barrett, PhD Space Telescope Science Institute
Phone: 410-338-4475 ESS/Science Software Branch
FAX: 410-338-4767 Baltimore, MD 21218