Package tacval :: Package webapp :: Module svg_builder
[hide private]
[frames] | no frames]

Module svg_builder

source code

Constructs an SVG (Scalable Vector Graphics) object and writes it to extraction_line.svg. This file is later embedded into the extraction line html page get_extraction_line_html The graphic displays the current state of the extraction line ie which valves are open and which components are running

Classes [hide private]
  SVGScene
Maintains a collection of SVG elements and can write to file
  Text
  Circle
  Rectangle
Functions [hide private]
dict
load_valves()
open a setup file and parse in the valve names and coordinates
source code
 
load(scene)
load the scene with objects
source code
 
load_extraction_line_svg() source code
 
colorstr(rgb) source code

Imports: os, get_valve_state, parse_setupfile


Function Details [hide private]

load_valves()

source code 

open a setup file and parse in the valve names and coordinates

Returns: dict
a dictionary of valve name : x,y

load(scene)

source code 

load the scene with objects

Parameters: