[GRASS-SVN] r48195 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 7 21:52:08 EDT 2011
Author: cmbarton
Date: 2011-09-07 18:52:08 -0700 (Wed, 07 Sep 2011)
New Revision: 48195
Modified:
grass/trunk/gui/wxpython/gui_modules/psmap.py
Log:
Added doc strings
Modified: grass/trunk/gui/wxpython/gui_modules/psmap.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/psmap.py 2011-09-08 01:49:36 UTC (rev 48194)
+++ grass/trunk/gui/wxpython/gui_modules/psmap.py 2011-09-08 01:52:08 UTC (rev 48195)
@@ -675,6 +675,9 @@
return wx.Rect(X, Y, abs(W), abs(H)).Inflate(h,h)
def makePSFont(self, textDict):
+ """!creates a wx.Font object from selected postscript font. To be
+ used for estimating bounding rectangle of text"""
+
fontsize = textDict['fontsize'] * self.canvas.currScale
fontface = textDict['font'].split('-')[0]
try:
@@ -720,6 +723,7 @@
def getTextExtent(self, textDict):
+ """!Estimates bounding rectangle of text"""
#fontsize = str(fontsize if fontsize >= 4 else 4)
dc = wx.PaintDC(self) # dc created because of method GetTextExtent, which pseudoDC lacks
More information about the grass-commit
mailing list