|
15 | 15 | import re |
16 | 16 |
|
17 | 17 |
|
18 | | -FM_LAYERS = { |
19 | | - "FM-Frame": 3, # Green - frames, ticks, gridlines |
20 | | - "FM-Graph": 4, # Cyan - data graphs/lines |
21 | | - "FM-Location": 6, # Magenta - location name text |
22 | | - "FM-Method": 5, # Blue - method icons and names |
23 | | - "FM-Depth": 1, # Red - Y-axis values (depth/elevation) |
24 | | - "FM-Value": 8, # Grey - X-axis values |
25 | | - "FM-Text": 2, # Yellow - axis labels and other text |
26 | | - "FM-Grid-Vertical": 7, # Light Blue - vertical grid lines |
27 | | - "FM-Grid-Horizontal": 7, # Light Blue - horizontal grid lines |
28 | | -} |
29 | | - |
30 | 18 | FM_LAYER_STYLES = { |
31 | | - "FM-Frame": {"color": FM_LAYERS["FM-Frame"], "linetype": "CONTINUOUS"}, |
32 | | - "FM-Graph": {"color": FM_LAYERS["FM-Graph"], "linetype": "CONTINUOUS"}, |
33 | | - "FM-Location": {"color": FM_LAYERS["FM-Location"], "linetype": "CONTINUOUS"}, |
34 | | - "FM-Method": {"color": FM_LAYERS["FM-Method"], "linetype": "CONTINUOUS"}, |
35 | | - "FM-Depth": {"color": FM_LAYERS["FM-Depth"], "linetype": "CONTINUOUS"}, |
36 | | - "FM-Value": {"color": FM_LAYERS["FM-Value"], "linetype": "CONTINUOUS"}, |
37 | | - "FM-Text": {"color": FM_LAYERS["FM-Text"], "linetype": "CONTINUOUS"}, |
38 | | - "FM-Grid-Vertical": {"color": FM_LAYERS["FM-Grid-Vertical"], "linetype": "DASHED2"}, |
39 | | - "FM-Grid-Horizontal": {"color": FM_LAYERS["FM-Grid-Horizontal"], "linetype": "DASHED2"}, |
| 19 | + "FM-Frame": {"color": 3, "linetype": "CONTINUOUS"}, # Green - frames, ticks, gridlines |
| 20 | + "FM-Graph": {"color": 4, "linetype": "CONTINUOUS"}, # Cyan - data graphs/lines |
| 21 | + "FM-Location": {"color": 6, "linetype": "CONTINUOUS"}, # Magenta - location name text |
| 22 | + "FM-Method": {"color": 5, "linetype": "CONTINUOUS"}, # Blue - method icons and names |
| 23 | + "FM-Depth": {"color": 1, "linetype": "CONTINUOUS"}, # Red - Y-axis values (depth/elevation) |
| 24 | + "FM-Value": {"color": 8, "linetype": "CONTINUOUS"}, # Grey - X-axis values |
| 25 | + "FM-Text": {"color": 2, "linetype": "CONTINUOUS"}, # Yellow - axis labels and other text |
| 26 | + "FM-Grid-Vertical": {"color": 7, "linetype": "DASHED2"}, # Light Blue - vertical grid lines |
| 27 | + "FM-Grid-Horizontal": {"color": 7, "linetype": "DASHED2"}, # Light Blue - horizontal grid lines |
40 | 28 | } |
41 | 29 |
|
| 30 | +# Backwards compatible alias used by older callers/tests. |
| 31 | +FM_LAYERS = {name: style["color"] for name, style in FM_LAYER_STYLES.items()} |
| 32 | + |
42 | 33 |
|
43 | 34 | def create_fm_layers(drawing): |
44 | 35 | """Create FM-specific layers with their configured colors.""" |
|
0 commit comments