From: <md...@us...> - 2007-07-18 16:46:00
|
Revision: 3561 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3561&view=rev Author: mdboom Date: 2007-07-18 09:45:55 -0700 (Wed, 18 Jul 2007) Log Message: ----------- Make Cairo and Gdk backends work with new mathtext refactoring. Modified Paths: -------------- branches/mathtext_mgd/lib/matplotlib/backends/backend_cairo.py branches/mathtext_mgd/lib/matplotlib/backends/backend_gdk.py Modified: branches/mathtext_mgd/lib/matplotlib/backends/backend_cairo.py =================================================================== --- branches/mathtext_mgd/lib/matplotlib/backends/backend_cairo.py 2007-07-18 15:57:40 UTC (rev 3560) +++ branches/mathtext_mgd/lib/matplotlib/backends/backend_cairo.py 2007-07-18 16:45:55 UTC (rev 3561) @@ -314,9 +314,8 @@ # "_draw_mathtext()") # return - size = prop.get_size_in_points() - width, height, fonts = math_parse_s_ft2font( - s, self.dpi.get(), size) + width, height, fonts, used_characters = math_parse_s_ft2font( + s, self.dpi.get(), prop) if angle==90: width, height = height, width @@ -372,8 +371,8 @@ def get_text_width_height(self, s, prop, ismath): if _debug: print '%s.%s()' % (self.__class__.__name__, _fn_name()) if ismath: - width, height, fonts = math_parse_s_ft2font( - s, self.dpi.get(), prop.get_size_in_points()) + width, height, fonts, used_characters = math_parse_s_ft2font( + s, self.dpi.get(), prop) return width, height ctx = self.text_ctx Modified: branches/mathtext_mgd/lib/matplotlib/backends/backend_gdk.py =================================================================== --- branches/mathtext_mgd/lib/matplotlib/backends/backend_gdk.py 2007-07-18 15:57:40 UTC (rev 3560) +++ branches/mathtext_mgd/lib/matplotlib/backends/backend_gdk.py 2007-07-18 16:45:55 UTC (rev 3561) @@ -204,9 +204,8 @@ def _draw_mathtext(self, gc, x, y, s, prop, angle): - size = prop.get_size_in_points() - width, height, fonts = math_parse_s_ft2font( - s, self.dpi.get(), size) + width, height, fonts, used_characters = math_parse_s_ft2font( + s, self.dpi.get(), prop) if angle==90: width, height = height, width @@ -348,8 +347,8 @@ def get_text_width_height(self, s, prop, ismath): if ismath: - width, height, fonts = math_parse_s_ft2font( - s, self.dpi.get(), prop.get_size_in_points()) + width, height, fonts, used_characters = math_parse_s_ft2font( + s, self.dpi.get(), prop) return width, height layout, inkRect, logicalRect = self._get_pango_layout(s, prop) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |