~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to dotgraph.py

  • Committer: Aaron Bentley
  • Date: 2005-09-22 21:31:04 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050922213104-666e41891805df62
Enabled client-side imagemaps

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
import shutil
9
9
 
10
10
RSVG_OUTPUT_TYPES = ('png', 'jpg')
11
 
DOT_OUTPUT_TYPES = ('svg', 'svgz', 'gif', 'jpg', 'ps', 'fig', 'mif', 'png')
 
11
DOT_OUTPUT_TYPES = ('svg', 'svgz', 'gif', 'jpg', 'ps', 'fig', 'mif', 'png', 
 
12
                    'cmapx')
12
13
 
13
14
class NoDot(Exception):
14
15
    def __init__(self):
30
31
            self.node_style = []
31
32
        self.cluster = cluster
32
33
        self.rank = None
 
34
        self.href = None
33
35
 
34
36
    def define(self):
35
37
        attributes = []
44
46
        if label is not None:
45
47
            attributes.append('label="%s"' % label)
46
48
        attributes.append('shape="box"')
 
49
        if self.href is not None:
 
50
            attributes.append('href="%s"' % self.href)
47
51
        if len(attributes) > 0:
48
52
            return '%s[%s]' % (self.name, " ".join(attributes))
49
53