* wrap/python/cgi/ltl2tgba.in: Use darker color and introduce

the new variable dot_bgcolor.
This commit is contained in:
Alexandre Duret-Lutz 2004-04-21 19:52:30 +00:00
parent 5904255b14
commit 231a77a05f
2 changed files with 8 additions and 5 deletions

View file

@ -1,5 +1,8 @@
2004-04-21 Alexandre Duret-Lutz <adl@gnu.org> 2004-04-21 Alexandre Duret-Lutz <adl@gnu.org>
* wrap/python/cgi/ltl2tgba.in: Use darker color and introduce
the new variable dot_bgcolor.
* wrap/python/cgi/ltl2tgba.in (add_options): Revamp options output * wrap/python/cgi/ltl2tgba.in (add_options): Revamp options output
using this new function. using this new function.

View file

@ -47,6 +47,7 @@ extra_form_notice = ''
# Location of the dot command # Location of the dot command
dot = 'dot' # in PATH. dot = 'dot' # in PATH.
dot_bgcolor = '-Gbgcolor=#FFFFFF'
# dot = '/usr/local/bin/dot' # dot = '/usr/local/bin/dot'
def print_footer(): def print_footer():
@ -153,8 +154,8 @@ def print_stats(automaton):
return False return False
def render_dot(basename): def render_dot(basename):
os.spawnlp(os.P_WAIT, dot, dot, '-Tpng', '-Gsize=14,14', '-o', os.spawnlp(os.P_WAIT, dot, dot, dot_bgcolor, '-Tpng',
basename + '.png', basename + '.txt') '-Gsize=14,14', '-o', basename + '.png', basename + '.txt')
reset_alarm() reset_alarm()
b = cgi.escape(basename) b = cgi.escape(basename)
print '<img src="' + b + '.png"><br>(<a href="' + b + '.txt">dot source</a>)' print '<img src="' + b + '.png"><br>(<a href="' + b + '.txt">dot source</a>)'
@ -190,9 +191,8 @@ LTL-to-B&uuml;chi translator</H1>""" % extra_header
formula = form.getfirst('formula', '') formula = form.getfirst('formula', '')
#F8F0E8 color_fm = "#D3AEF8"
color_fm = '#E0D8E0' color_lacim = "#F8AED3"
color_lacim = "#F8D8E8"
options_common = [ options_common = [
('show_formula_png', 'draw the formula', 0), ('show_formula_png', 'draw the formula', 0),