~tmk/widelands/help-gen-ng

« back to all changes in this revision

Viewing changes to utils/make_flow_diagram.py

  • Committer: Tmk
  • Date: 2010-10-30 23:08:25 UTC
  • Revision ID: tmk@riseup.net-20101030230825-l92gt3j36dv32l2u
make graph background transparent, nodes get background colors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
{costs}
92
92
</TABLE>>""".format(b=b, workers=workers, costs=costs).replace('\n',''),
93
93
        URL = "../../buildings/{b.name}/test.html".format(b=b),
 
94
        bgcolor = "#eeeeee",
94
95
    )
95
96
 
96
97
 
133
134
<TR><TD><IMG SRC="{w.image}"/></TD></TR>
134
135
<TR><TD>{w.descname}</TD></TR>
135
136
</TABLE>>""").format(w=w),
136
 
             URL = "../../wares/{warename}/test.html".format(warename=w.name))
 
137
             URL = "../../wares/{warename}/test.html".format(warename=w.name),
 
138
             bgcolor = "#eeeeee",
 
139
)
137
140
 
138
141
    g.add_node(n)
139
142
 
176
179
    b = t.buildings[building_name]
177
180
   
178
181
    g = CleanedDot(concentrate="false", 
179
 
                overlap="false", splines="true", rankdir="LR", bgcolor="#eeeeee")
 
182
                overlap="false", splines="true", rankdir="LR")
180
183
 
181
184
    if not isinstance(b, (ProductionSite,)):
182
185
        inputs, outputs = [], []
210
213
    w = t.wares[ware_name]
211
214
 
212
215
    g = CleanedDot(concentrate="false", 
213
 
                overlap="false", splines="true", rankdir="LR", bgcolor="#eeeeee")
 
216
                overlap="false", splines="true", rankdir="LR")
214
217
 
215
218
    buildings = [bld for bld in t.buildings.values() if isinstance(bld, (ProductionSite, )) and (w.name in bld.inputs or w.name in bld.outputs)]
216
219
    [add_building(g, bld, limit_inputs=[w.name], limit_outputs=[w.name], limit_buildings=[b.name for b in buildings]) for bld in buildings]