bernhard: thuban/Extensions/svgexport maplegend.py, 1.1, 1.2 svgmapwriter.py, 1.5, 1.6 svgsaver.py, 1.3, 1.4
cvs@intevation.de
cvs at intevation.de
Mon Nov 15 17:27:43 CET 2004
Author: bernhard
Update of /thubanrepository/thuban/Extensions/svgexport
In directory doto:/tmp/cvs-serv31569/Extensions/svgexport
Modified Files:
maplegend.py svgmapwriter.py svgsaver.py
Log Message:
* Extensions/svgexport/: Minor improvements to doc strings.
Index: maplegend.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/svgexport/maplegend.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- maplegend.py 19 Feb 2004 13:38:27 -0000 1.1
+++ maplegend.py 15 Nov 2004 16:27:41 -0000 1.2
@@ -119,9 +119,10 @@
def write_legend(context):
- '''The main export funtion - Exports the data depending
- on the set properties.
- '''
+ """Export the data depending on the set properties.
+
+ This is the main export function.
+ """
canvas = context.mainwindow.canvas
file = None
map = canvas.Map()
Index: svgmapwriter.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/svgexport/svgmapwriter.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- svgmapwriter.py 27 Sep 2004 09:56:13 -0000 1.5
+++ svgmapwriter.py 15 Nov 2004 16:27:41 -0000 1.6
@@ -8,7 +8,7 @@
"""
-Classes needed to write a session in SVG format
+Classes needed to write a session in SVG format.
"""
# For compatibility with python 2.2
@@ -52,16 +52,14 @@
# Some pseudo classes to be compatible with the Baserenderer-class.
#
class Point:
- """A simple Point class."""
+ """Simple Point class to save x,y coordinates."""
def __init__(self, xp=0, yp=0):
- """Init the point object."""
self.x = xp
self.y = yp
class Trafo:
- """Class for tranformation properties transfer."""
+ """Class for transformation properties transfer."""
def __init__(self):
- """Initialize the class."""
self.trafos = []
def Append(self, type, coeffs):
@@ -79,9 +77,7 @@
else: return None
class Pattern:
- """Pattern object """
def __init__(self, solid=1):
- """Init the Pattern object."""
self.solid = solid
class Pen:
@@ -94,23 +90,18 @@
self.cap = 'round'
def GetColor(self):
- """Return the pen's color."""
return self.color
def GetWidth(self):
- """Return the pen's width."""
return self.width
def GetJoin(self):
- """Return the pen's join type."""
return self.join
def GetCap(self):
- """Return the pen's cap type."""
return self.cap
def GetDashes(self):
- """Return the pen's dashes."""
if self.dashes is None or self.dashes is SOLID:
return []
else: return self.dashes
@@ -123,11 +114,9 @@
self.pattern = bpattern
def GetColor(self):
- """Return the brush color."""
return self.fill
def GetPattern(self):
- """Return the Brush pattern object."""
return self.pattern
class Font:
Index: svgsaver.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/svgexport/svgsaver.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- svgsaver.py 21 Sep 2004 21:30:36 -0000 1.3
+++ svgsaver.py 15 Nov 2004 16:27:41 -0000 1.4
@@ -30,8 +30,9 @@
def write_to_svg(context):
- '''The main export funtion - Exports the data depending
- on the set properties.
+ '''Export data depending on the set properties.
+
+ This is the main export funcation.
'''
canvas = context.mainwindow.canvas
file = None
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)