| 62 | * 1st prototype |
| 63 | * d.legend.vector |
| 64 | * in: list of d.vect commands from layer manager |
| 65 | * Python |
| 66 | * extract: symbol color1 color2 size width text |
| 67 | * symbol |
| 68 | * symbols for lines and areas must be created |
| 69 | * icon if v.info returns lines, then use the new symbol for lines |
| 70 | * icon if v.info returns areas, then use the new symbol for areas |
| 71 | * use icon for points |
| 72 | * use icon when explicitly specified (there is a default but GUI does not put it there unlike history) |
| 73 | * if mixed feature types, either special symbols or separate entries or just use symbol (needs to be decided) |
| 74 | * color1=color |
| 75 | * color2=fill_color |
| 76 | * size=size |
| 77 | * width=width |
| 78 | * text=title or name |
| 79 | * generates d.graph file |
| 80 | * GUI takes d.vect commands, calls this module and uses the output in d.graph when rendering |
| 81 | * 2nd stage |
| 82 | * text format for customization |
| 83 | * `symbol color1 color2 size width text...` |
| 84 | * `legend/lines_z` red none 5 2 State border |
| 85 | |
| 86 | G7:d.graph code: |
| 87 | |
| 88 | {{{ |
| 89 | color red |
| 90 | polygon |
| 91 | 10 10 |
| 92 | 10 20 |
| 93 | 20 20 |
| 94 | 20 10 |
| 95 | color black |
| 96 | move 22 10 |
| 97 | size 24 24 |
| 98 | text Red area |
| 99 | }}} |
| 100 | |
| 101 | See for example: source:grass-addons/tools/std_dataset_display.py and [https://grasswiki.osgeo.org/w/images/Std_dataset_nc_stripe.png the resulting image]. |