Changeset 7597
- Timestamp:
- 05/16/08 04:27:26 (2 months ago)
- Files:
-
- trunk/mapserver/HISTORY.TXT (modified) (1 diff)
- trunk/mapserver/mapagg.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/mapserver/HISTORY.TXT
r7594 r7597 13 13 Current Version (5.1-dev, SVN trunk): 14 14 ------------------------------------- 15 - AGG: enable ellipse symbol rotation for POINT/ANNOTATION layers (#2617) 15 16 16 17 - RFC36: add more extensions to support templates (#2576) trunk/mapserver/mapagg.cpp
r7581 r7597 286 286 ///@param outlinecolor the color of the outline, or NULL for no outline 287 287 ///@param outlinewidth the width of the optional outline 288 void renderEllipse(double x, double y, double w, double h, agg::rgba8 &color,288 void renderEllipse(double x, double y, double w, double h, double angle, agg::rgba8 &color, 289 289 agg::rgba8 &outlinecolor, double outlinewidth=1) { 290 290 agg::path_storage path; 291 291 agg::ellipse ellipse(x,y,w/2.,h/2.0); 292 292 path.concat_path(ellipse); 293 if( (fabs(angle)>_EPSILON) || (fabs(MS_2PI-angle)>_EPSILON)) { 294 agg::trans_affine mtx; 295 mtx *= agg::trans_affine_translation(-x,-y); 296 /*agg angles are antitrigonometric*/ 297 mtx *= agg::trans_affine_rotation(-angle); 298 mtx *= agg::trans_affine_translation(x,y); 299 path.transform(mtx); 300 } 293 301 renderPathSolid(path,color,outlinecolor,outlinewidth); 294 302 } … … 1209 1217 agg_bcolor=getAGGColor(&style->backgroundcolor,style->opacity); 1210 1218 if(style->symbol == 0) { // simply draw a circle of the specified color 1211 ren->renderEllipse(p->x+ox,p->y+oy,size,size, agg_color,agg_ocolor,width);1219 ren->renderEllipse(p->x+ox,p->y+oy,size,size,0,agg_color,agg_ocolor,width); 1212 1220 return; 1213 1221 } … … 1241 1249 if(symbol->filled) { 1242 1250 //draw an optionnally filled and/or outlined ellipse 1243 ren->renderEllipse(x,y,w,h,a gg_color,agg_ocolor,width);1251 ren->renderEllipse(x,y,w,h,angle_radians,agg_color,agg_ocolor,width); 1244 1252 } 1245 1253 else { … … 1252 1260 return; 1253 1261 //draw only the outline 1254 ren->renderEllipse(x,y,w,h, AGG_NO_COLOR,*c,width);1262 ren->renderEllipse(x,y,w,h,angle_radians,AGG_NO_COLOR,*c,width); 1255 1263 } 1256 1264 } … … 1376 1384 if(symbol->filled) { 1377 1385 //draw an optionnally filled and/or outlined vector symbol 1378 ren->renderEllipse(point.x,point.y,sw,sh, agg_color,agg_ocolor,outlinewidth);1386 ren->renderEllipse(point.x,point.y,sw,sh,0,agg_color,agg_ocolor,outlinewidth); 1379 1387 } 1380 1388 else { … … 1387 1395 return; 1388 1396 //draw only the outline 1389 ren->renderEllipse(point.x,point.y,sw,sh, AGG_NO_COLOR,*c,outlinewidth);1397 ren->renderEllipse(point.x,point.y,sw,sh,0,AGG_NO_COLOR,*c,outlinewidth); 1390 1398 } 1391 1399 break;
