Revision: 8135
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8135&view=rev
Author: leejjoon
Date: 2010-02-16 22:55:27 +0000 (Tue, 16 Feb 2010)
Log Message:
-----------
fix a bug in Text._get_layout that returns an incorrect information for an
empty string
Modified Paths:
--------------
branches/v0_99_maint/lib/matplotlib/text.py
Modified: branches/v0_99_maint/lib/matplotlib/text.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/text.py 2010-02-16 14:31:02 UTC (rev
8134)
+++ branches/v0_99_maint/lib/matplotlib/text.py 2010-02-16 22:55:27 UTC (rev
8135)
@@ -275,8 +275,11 @@
baseline = None
for i, line in enumerate(lines):
clean_line, ismath = self.is_math_text(line)
- w, h, d = renderer.get_text_width_height_descent(
- clean_line, self._fontproperties, ismath=ismath)
+ if clean_line:
+ w, h, d = renderer.get_text_width_height_descent(
+ clean_line, self._fontproperties, ismath=ismath)
+ else:
+ w, h, d = 0, 0, 0
if baseline is None:
baseline = h - d
whs[i] = w, h
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins