You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2004/04/15 15:13:26 UTC
cvs commit: gump/python/gump/svg depdiag.py drawing.py
ajack 2004/04/15 06:13:26
Modified: . gumpy.py .cvsignore
python/gump/svg depdiag.py drawing.py
Log:
Tweaks.
Revision Changes Path
1.17 +1 -1 gump/gumpy.py
Index: gumpy.py
===================================================================
RCS file: /home/cvs/gump/gumpy.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- gumpy.py 12 Apr 2004 18:57:37 -0000 1.16
+++ gumpy.py 15 Apr 2004 13:13:26 -0000 1.17
@@ -337,7 +337,7 @@
except:
published=0
- if not published:
+ if 1 or not published:
catFile(sys.stdout, logFile, logTitle)
if mailserver and mailport and mailto and mailfrom and logurl:
1.22 +1 -0 gump/.cvsignore
Index: .cvsignore
===================================================================
RCS file: /home/cvs/gump/.cvsignore,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- .cvsignore 2 Apr 2004 16:48:07 -0000 1.21
+++ .cvsignore 15 Apr 2004 13:13:26 -0000 1.22
@@ -20,5 +20,6 @@
test
x.txt
gumpy.log
+*_log.txt
gumpy.lock
out.tmp
1.4 +31 -11 gump/python/gump/svg/depdiag.py
Index: depdiag.py
===================================================================
RCS file: /home/cvs/gump/python/gump/svg/depdiag.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- depdiag.py 14 Apr 2004 22:32:45 -0000 1.3
+++ depdiag.py 15 Apr 2004 13:13:26 -0000 1.4
@@ -177,7 +177,9 @@
# context rectangle.
svg=SimpleSvg(rect.getWidth(),rect.getHeight())
- # Draw ...
+ #
+ # Draw dependency lines
+ #
for node in self.matrix.getNodes():
project = node.getProject()
(row, col) = node.getRowCol()
@@ -197,10 +199,25 @@
print 'VIRTUAL LINE: %s,%s -> %s,%s' % (row,col,depRow,depCol),
print 'LINE: %s,%s -> %s,%s' % (x,y,x1,y1)
+ width=1+(dependProject.getFOGFactor()*3)
+ # Shape color
+ color='black'
+ if project.isPackaged():
+ color='blue'
+ elif not project.hasBuildCommand():
+ color='purple'
+ elif project.getFOGFactor() < 0.1:
+ color='red'
+
svg.addLine(x,y,x1,y1, \
- { 'stroke':'black', \
+ { 'stroke':color, \
+ 'stroke-width':width, \
'comment': project.getName() + ' to ' + dependProject.getName() } )
-
+
+
+ #
+ # The shapes and text
+ #
for node in self.matrix.getNodes():
project = node.getProject()
(row,col) = node.getRowCol()
@@ -209,17 +226,20 @@
(x1,y1) = context.realPoint(col+0.25,(rows-row)+0.25)
print 'RECTANGLE %s,%s -> %s,%s' % (x,y,x1,y1)
+
+ # Shape color
+ color='green'
+ if project.isPackaged():
+ color='blue'
+ elif not project.hasBuildCommand():
+ color='purple'
+ elif project.getFOGFactor() < 0.1:
+ color='red'
svg.addRect(x,y,(x1-x),(y1-y), \
- { 'fill':'green', \
+ { 'fill':color, \
'comment':project.getName() } )
-
- for node in self.matrix.getNodes():
- project = node.getProject()
- (row,col) = node.getRowCol()
-
- (x,y) = context.realPoint(col,rows-row)
-
+
print 'TEXT %s,%s' % (x,y)
svg.addText(x,y,project.getName(), \
1.3 +18 -0 gump/python/gump/svg/drawing.py
Index: drawing.py
===================================================================
RCS file: /home/cvs/gump/python/gump/svg/drawing.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- drawing.py 14 Apr 2004 22:12:58 -0000 1.2
+++ drawing.py 15 Apr 2004 13:13:26 -0000 1.3
@@ -27,6 +27,24 @@
from gump import log
from gump.utils import *
+class Point:
+ """ A point """
+ def __init__(self,x,y):
+ self.x=x
+ self.y=y
+
+ def getX(self): return self.x
+ def getY(self): return self.y
+
+ def dump(self, indent=0, output=sys.stdout):
+ """ Display the contents of this object """
+ output.write(getIndent(indent)+'Point : ' \
+ + `self.x` + ',' \
+ + `self.y` + '\n')
+
+ def __str__(self):
+ return '(' + `self.x` + ',' + `self.y` + ')'
+
class Rect:
""" A rectangle """
def __init__(self,x,y,w,h):
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org