| 127 | } |
| 128 | |
| 129 | int msDrawVBarChart(mapObj *map, imageObj *image, pointObj *center, |
| 130 | float *values, styleObj **styles, int numvalues, |
| 131 | float barWidth) |
| 132 | { |
| 133 | |
| 134 | int c; |
| 135 | float left,bottom,cur; /*shortcut to pixel boundaries of the chart*/ |
| 136 | float height = 0; |
| 137 | |
| 138 | for(c=0;c<numvalues;c++) |
| 139 | { |
| 140 | height += values[c]; |
| 141 | } |
| 142 | |
| 143 | cur = bottom = center->y+height/2.; |
| 144 | left = center->x-barWidth/2.; |
| 145 | |
| 146 | for(c=0;c<numvalues;c++) |
| 147 | { |
| 148 | drawRectangle(map, image, left, cur, left+barWidth, cur-values[c], styles[c]); |
| 149 | cur -= values[c]; |
| 150 | } |
| 151 | return MS_SUCCESS; |
| 152 | } |
| 153 | |
| 154 | |
| 155 | int msDrawBarChart(mapObj *map, imageObj *image, pointObj *center, |
no test coverage detected