SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

Revision: 3761
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3761&view=rev
Author: mdboom
Date: 2007年08月31日 08:09:27 -0700 (2007年8月31日)
Log Message:
-----------
Fix typo.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2007年08月30日 19:14:55 UTC (rev 3760)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2007年08月31日 15:09:27 UTC (rev 3761)
@@ -172,7 +172,7 @@
 """
 if __debug__: verbose.report('RendererAgg.draw_mathtext',
 'debug-annoying')
- ox, oy, width, height, descent, fonts, used_characters = \
+ ox, oy, width, height, descent, font_image, used_characters = \
 self.mathtext_parser.parse(s, self.dpi.get(), prop)
 
 if angle == 90:
@@ -183,10 +183,9 @@
 else:
 x = int(x) + ox
 y = int(y) - height + oy
- for font in fonts:
- if angle == 90:
- font.horiz_image_to_vert_image() # <-- Rotate
- self._renderer.draw_text( font, x, y + 1, gc)
+ if angle == 90:
+ font_image.rotate() # <-- Rotate 90 deg
+ self._renderer.draw_text_image(font_image, x, y + 1, gc)
 if 0:
 self._renderer.draw_rectangle(gc, None,
 int(x),
@@ -212,7 +211,7 @@
 
 #print x, y, int(x), int(y)
 
- self._renderer.draw_text(font, int(x), int(y) + 1, gc)
+ self._renderer.draw_text_image(font.get_image(), int(x), int(y) + 1, gc)
 
 
 def get_text_width_height_descent(self, s, prop, ismath, rgb=(0,0,0)):
@@ -233,9 +232,9 @@
 return n,m
 
 if ismath:
- ox, oy, width, height, descent, fonts, used_characters = \
+ ox, oy, width, height, descent, font_image, used_characters = \
 self.mathtext_parser.parse(s, self.dpi.get(), prop)
- return width, height, depth
+ return width, height, descent
 font = self._get_agg_font(prop)
 font.set_text(s, 0.0, flags=LOAD_DEFAULT) # the width and height of unrotated string
 w, h = font.get_width_height()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3762
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3762&view=rev
Author: mdboom
Date: 2007年08月31日 08:40:42 -0700 (2007年8月31日)
Log Message:
-----------
Oops in last commit.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2007年08月31日 15:09:27 UTC (rev 3761)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2007年08月31日 15:40:42 UTC (rev 3762)
@@ -172,7 +172,7 @@
 """
 if __debug__: verbose.report('RendererAgg.draw_mathtext',
 'debug-annoying')
- ox, oy, width, height, descent, font_image, used_characters = \
+ ox, oy, width, height, descent, fonts, used_characters = \
 self.mathtext_parser.parse(s, self.dpi.get(), prop)
 
 if angle == 90:
@@ -183,9 +183,10 @@
 else:
 x = int(x) + ox
 y = int(y) - height + oy
- if angle == 90:
- font_image.rotate() # <-- Rotate 90 deg
- self._renderer.draw_text_image(font_image, x, y + 1, gc)
+ for font in fonts:
+ if angle == 90:
+ font.horiz_image_to_vert_image() # <-- Rotate
+ self._renderer.draw_text( font, x, y + 1, gc)
 if 0:
 self._renderer.draw_rectangle(gc, None,
 int(x),
@@ -211,7 +212,7 @@
 
 #print x, y, int(x), int(y)
 
- self._renderer.draw_text_image(font.get_image(), int(x), int(y) + 1, gc)
+ self._renderer.draw_text(font, int(x), int(y) + 1, gc)
 
 
 def get_text_width_height_descent(self, s, prop, ismath, rgb=(0,0,0)):
@@ -232,7 +233,7 @@
 return n,m
 
 if ismath:
- ox, oy, width, height, descent, font_image, used_characters = \
+ ox, oy, width, height, descent, fonts, used_characters = \
 self.mathtext_parser.parse(s, self.dpi.get(), prop)
 return width, height, descent
 font = self._get_agg_font(prop)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3768
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3768&view=rev
Author: jouni
Date: 2007年09月03日 09:29:08 -0700 (2007年9月03日)
Log Message:
-----------
Fix buglet in get_text_width_height_descent of backend_agg
when text.usetex is in effect. The descent returned is probably 
not correct, but it should be similar to the one returned by
backend_ps.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2007年09月02日 18:49:20 UTC (rev 3767)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2007年09月03日 16:29:08 UTC (rev 3768)
@@ -228,7 +228,8 @@
 texmanager = self.get_texmanager()
 Z = texmanager.get_rgba(s, size, self.dpi.get(), rgb)
 m,n,tmp = Z.shape
- return n,m
+ # TODO: descent of TeX text (I am imitating backend_ps here -JKS)
+ return n, m, m
 
 if ismath:
 ox, oy, width, height, descent, fonts, used_characters = \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4873
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4873&view=rev
Author: jdh2358
Date: 2008年01月16日 20:12:58 -0800 (2008年1月16日)
Log Message:
-----------
forced nonunicode fname for save in agg
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2008年01月16日 13:04:50 UTC (rev 4872)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2008年01月17日 04:12:58 UTC (rev 4873)
@@ -299,5 +299,6 @@
 renderer = self.get_renderer()
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
+ filename = str(filename) # until we figure out unicode handling
 renderer._renderer.write_png(filename, self.figure.dpi)
 renderer.dpi = original_dpi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5170
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5170&view=rev
Author: efiring
Date: 2008年05月17日 10:05:36 -0700 (2008年5月17日)
Log Message:
-----------
Open png files in binary mode; bug found by J?195円?182円rgen Stenarson
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2008年05月17日 13:33:42 UTC (rev 5169)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2008年05月17日 17:05:36 UTC (rev 5170)
@@ -290,7 +290,7 @@
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
 if type(filename_or_obj) in (str, unicode):
- filename_or_obj = open(filename_or_obj, 'w')
+ filename_or_obj = open(filename_or_obj, 'wb')
 renderer._renderer.write_rgba(filename_or_obj)
 renderer.dpi = original_dpi
 print_rgba = print_raw
@@ -301,6 +301,6 @@
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
 if type(filename_or_obj) in (str, unicode):
- filename_or_obj = open(filename_or_obj, 'w')
+ filename_or_obj = open(filename_or_obj, 'wb')
 self.get_renderer()._renderer.write_png(filename_or_obj, self.figure.dpi)
 renderer.dpi = original_dpi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5173
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5173&view=rev
Author: jdh2358
Date: 2008年05月17日 14:06:39 -0700 (2008年5月17日)
Log Message:
-----------
committing in advance of a merge
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2008年05月17日 21:06:05 UTC (rev 5172)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2008年05月17日 21:06:39 UTC (rev 5173)
@@ -290,7 +290,7 @@
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
 if type(filename_or_obj) in (str, unicode):
- filename_or_obj = open(filename_or_obj, 'wb')
+ filename_or_obj = opefile(filename_or_obj, 'wb')
 renderer._renderer.write_rgba(filename_or_obj)
 renderer.dpi = original_dpi
 print_rgba = print_raw
@@ -301,6 +301,6 @@
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
 if type(filename_or_obj) in (str, unicode):
- filename_or_obj = open(filename_or_obj, 'wb')
+ filename_or_obj = file(filename_or_obj, 'wb')
 self.get_renderer()._renderer.write_png(filename_or_obj, self.figure.dpi)
 renderer.dpi = original_dpi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5194
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5194&view=rev
Author: mdboom
Date: 2008年05月19日 12:07:47 -0700 (2008年5月19日)
Log Message:
-----------
Remove typo.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2008年05月19日 19:05:23 UTC (rev 5193)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py	2008年05月19日 19:07:47 UTC (rev 5194)
@@ -290,7 +290,7 @@
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
 if is_string_like(filename_or_obj):
- filename_or_obj = opefile(filename_or_obj, 'wb')
+ filename_or_obj = file(filename_or_obj, 'wb')
 renderer._renderer.write_rgba(filename_or_obj)
 renderer.dpi = original_dpi
 print_rgba = print_raw
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /