jan: thuban/Thuban/Model classgen.py,1.18,1.19

cvs@intevation.de cvs at intevation.de
Thu Oct 7 16:28:53 CEST 2004


Author: jan

Update of /thubanrepository/thuban/Thuban/Model
In directory doto:/tmp/cvs-serv14858

Modified Files:
	classgen.py 
Log Message:
(CustomRamp.GetProperties): Added size gradient.


Index: classgen.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/Model/classgen.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- classgen.py	26 Sep 2003 18:36:01 -0000	1.18
+++ classgen.py	7 Oct 2004 14:28:51 -0000	1.19
@@ -1,6 +1,9 @@
-# Copyright (c) 2003 by Intevation GmbH
+# Copyright (c) 2003-2004 by Intevation GmbH
 # Authors:
-# Jonathan Coles <jonathan at intevation.de>
+# Jan-Oliver Wagner <jan at intevation.de> (2004)
+# Bernhard Herzog <bh at intevation.de> (2003)
+# Thomas Köster <tkoester at intevation.de> (2003)
+# Jonathan Coles <jonathan at intevation.de> (2003)
 #
 # This program is free software under the GPL (>=v2)
 # Read the file COPYING coming with Thuban for details.
@@ -141,7 +144,7 @@
                     max = _list[q]
 
                 group = ClassGroupRange(Range((start, min, max, end)), prop)
-    
+
                 group.SetLabel("%s%% - %s%%" % (round(oldp*100, 2), 
                                                 round(p*100, 2)))
                 oldp = p
@@ -156,7 +159,7 @@
 def calculate_quantiles(_list, percents, _range):
     """Calculate quantiles for the given _list of percents from the
     sorted list of values that are in range.
-                                                                            
+
     This may not actually generate len(percents) quantiles if
     many of the values that fall on quantile borders are the same.
 
@@ -344,6 +347,11 @@
             * index \
             + self.prop1.GetLineWidth()
         newProps.SetLineWidth(int(round(w)))
+
+        s = (self.prop2.GetSize() - self.prop1.GetSize()) \
+            * index \
+            + self.prop1.GetSize()
+        newProps.SetSize(int(round(s)))
 
         return newProps
 





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)