Changeset 586
- Timestamp:
- 08/18/16 22:01:16 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mds-and-trees/tree-genealogy.py
r585 r586 29 29 30 30 def hex_to_style(hex): 31 default_style = ' stroke="black" stroke-opacity="0.5" ' 32 31 33 if hex[0] == "#": 32 34 hex = hex[1:] … … 37 39 except: 38 40 print("Wrong characters in the color's hex #" + hex + "! Assuming black.") 39 return ' stroke="black" stroke-opacity="0.5" '41 return default_style 40 42 red = 100*int(hex[0:2], 16)/255 41 43 green = 100*int(hex[2:4], 16)/255 … … 47 49 else: 48 50 print("Wrong number of digits in the color's hex #" + hex + "! Assuming black.") 49 return ' stroke="black" stroke-opacity="0.5" '51 return default_style 50 52 51 53 def svg_add_line(from_pos, to_pos, style=svg_line_style):
Note: See TracChangeset
for help on using the changeset viewer.