From: <lee...@us...> - 2008-12-18 09:02:15
|
Revision: 6659 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6659&view=rev Author: leejjoon Date: 2008-12-18 09:02:11 +0000 (Thu, 18 Dec 2008) Log Message: ----------- Merged revisions 6658 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint ........ r6658 | leejjoon | 2008-12-18 03:55:50 -0500 (Thu, 18 Dec 2008) | 1 line fix dpi-dependent behavior of text bbox & annotate arrow ........ Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/text.py Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6653 + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6658 Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008-12-18 08:55:50 UTC (rev 6658) +++ trunk/matplotlib/CHANGELOG 2008-12-18 09:02:11 UTC (rev 6659) @@ -1,3 +1,6 @@ +2008-12-17 fix dpi-dependent behavior of text bbox and arrow in annotate + -JJL + 2008-12-17 Add group id support in artist. Two examples which demostrate svg filter are added. -JJL Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2008-12-18 08:55:50 UTC (rev 6658) +++ trunk/matplotlib/lib/matplotlib/text.py 2008-12-18 09:02:11 UTC (rev 6659) @@ -367,7 +367,8 @@ def update_bbox_position_size(self, renderer): - """ Update the location and the size of the bbox. This method + """ + Update the location and the size of the bbox. This method should be used when the position and size of the bbox needs to be updated before actually drawing the bbox. """ @@ -395,8 +396,8 @@ tr = mtransforms.Affine2D().rotate(theta) tr = tr.translate(posx+x_box, posy+y_box) self._bbox_patch.set_transform(tr) - fontsize = renderer.points_to_pixels(self.get_size()) - self._bbox_patch.set_mutation_scale(fontsize) + fontsize_in_pixel = renderer.points_to_pixels(self.get_size()) + self._bbox_patch.set_mutation_scale(fontsize_in_pixel) #self._bbox_patch.draw(renderer) else: @@ -434,7 +435,8 @@ tr = mtransforms.Affine2D().rotate(theta) tr = tr.translate(posx+x_box, posy+y_box) self._bbox_patch.set_transform(tr) - self._bbox_patch.set_mutation_scale(self.get_size()) + fontsize_in_pixel = renderer.points_to_pixels(self.get_size()) + self._bbox_patch.set_mutation_scale(fontsize_in_pixel) self._bbox_patch.draw(renderer) @@ -1563,6 +1565,7 @@ self.arrow_patch.set_positions((ox0, oy0), (ox1,oy1)) mutation_scale = d.pop("mutation_scale", self.get_size()) + mutation_scale = renderer.points_to_pixels(mutation_scale) self.arrow_patch.set_mutation_scale(mutation_scale) if self._bbox_patch: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |