Opened 18 years ago
Closed 16 years ago
#1523 closed enhancement (fixed)
Legend graphics for layer of type annotation
Reported by: | szekerest | Owned by: | tamas |
---|---|---|---|
Priority: | high | Milestone: | 5.4 release |
Component: | MapServer C Library | Version: | svn-trunk (development) |
Severity: | minor | Keywords: | |
Cc: |
Description (last modified by )
It would be desirable to reflect some of the attributes of the annotation layers like font and text color in the map legend. The legend image could be drawn as a sample text with the corresponding font and color. The following code snippet can do the work like this: maplegend.c line 128 switch(type) { case MS_LAYER_ANNOTATION: if (class->label.size != -1) { rectObj label_rect; labelObj label = class->label; label.angle = 0; if (label.type == MS_TRUETYPE) label.size = height; marker.x = dstX + MS_NINT(width / 2.0); marker.y = dstY + MS_NINT(height / 2.0); if(msGetLabelSize("Abc", &label, &label_rect, &map->fontset, 1.0) != -1) { pointObj label_point = get_metrics(&marker, MS_CC, label_rect, 0, 0, label.angle, 0, NULL); msDrawTextGD(img, label_point, "Abc", &label, &map- >fontset, 1.0); } } The sample text might also be placed in the map file. Tamas Szekeres
Change History (8)
comment:1 by , 18 years ago
Status: | new → assigned |
---|---|
Version: | 4.6 → 4.8 |
comment:3 by , 18 years ago
Milestone: | → 5.0 release |
---|
comment:4 by , 17 years ago
Description: | modified (diff) |
---|---|
Milestone: | 5.0 release → 5.2 release |
Too late (or too lazy) for 5.0 (unless you want to take it Tamas). Moving to 5.2.
Steve
comment:5 by , 16 years ago
Milestone: | 5.2 release → 5.4 release |
---|
Moving to 5.4 to address properly...
Steve
comment:6 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
I'll take over this bug and see how can it be done with the current version.
comment:7 by , 16 years ago
Status: | new → assigned |
---|
comment:8 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Version: | 4.10 → svn-trunk (development) |
Added in trunk r7859
Note:
See TracTickets
for help on using tickets.