[GRASS-SVN] r56368 - grass/trunk/gui/wxpython/psmap
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 23 00:23:08 PDT 2013
Author: annakrat
Date: 2013-05-23 00:23:08 -0700 (Thu, 23 May 2013)
New Revision: 56368
Modified:
grass/trunk/gui/wxpython/psmap/frame.py
Log:
wxGUI/composer: fix r56363
Modified: grass/trunk/gui/wxpython/psmap/frame.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/frame.py 2013-05-22 19:50:28 UTC (rev 56367)
+++ grass/trunk/gui/wxpython/psmap/frame.py 2013-05-23 07:23:08 UTC (rev 56368)
@@ -1858,16 +1858,17 @@
coords = self.instruction[id]['coords']# recalculate coordinates, they are not equal to BB
self.instruction[id]['coords'] = coords = [(int(coord) - view[i]) * zoomFactor
for i, coord in enumerate(coords)]
- self.DrawRotText(pdc = self.pdcObj, drawId = id, textDict = self.instruction[id],
- coords = coords, bounds = oRect )
extent = self.parent.getTextExtent(textDict = self.instruction[id])
if self.instruction[id]['rotate']:
rot = float(self.instruction[id]['rotate'])
else:
rot = 0
+ self.instruction[id]['rect'] = bounds = self.parent.getModifiedTextBounds(coords[0], coords[1], extent, rot)
+ self.DrawRotText(pdc = self.pdcObj, drawId = id, textDict = self.instruction[id],
+ coords = coords, bounds = bounds )
- self.instruction[id]['rect'] = bounds = self.parent.getModifiedTextBounds(coords[0], coords[1], extent, rot)
self.pdcObj.SetIdBounds(id, bounds)
+
elif type == 'northArrow':
self.Draw(pen = self.pen[type], brush = self.brush[type], pdc = self.pdcObj,
drawid = id, pdctype = 'bitmap', bb = oRect)
@@ -2042,7 +2043,6 @@
else:
rot = 0
- fontsize = textDict['fontsize'] * self.currScale
if textDict['background'] != 'none':
background = textDict['background']
else:
@@ -2071,7 +2071,7 @@
pdc.SetFont(fn)
pdc.SetTextForeground(convertRGB(textDict['color']))
if rot == 0:
- pdc.DrawLabel(text = textDict['text'], rect = bounds)
+ pdc.DrawLabel(text=textDict['text'], rect=bounds)
else:
pdc.DrawRotatedText(textDict['text'], coords[0], coords[1], rot)
More information about the grass-commit
mailing list