MCPcopy Index your code
hub / github.com/MapServer/MapServer / msDrawShadeSymbolIM

Function msDrawShadeSymbolIM

mapimagemap.c:1365–1628  ·  view source on GitHub ↗

------------------------------------------------------------------------- */ Draw a shade symbol of the specified size and color */ ------------------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

1363/* Draw a shade symbol of the specified size and color */
1364/* ------------------------------------------------------------------------- */
1365void msDrawShadeSymbolIM(symbolSetObj *symbolset, imageObj* img, shapeObj *p, styleObj *style, double scalefactor)
1366{
1367 symbolObj *symbol;
1368/* gdPoint oldpnt, newpnt;
1369 gdPoint sPoints[MS_MAXVECTORPOINTS];
1370 gdImagePtr tile;
1371 int x, y;
1372 int tile_bc=-1, tile_fc=-1; // colors (background and foreground) //
1373 int fc, bc, oc;
1374 double d;
1375 int bbox[8];
1376 rectObj rect;
1377 char *font=NULL;
1378 */
1379 int i,j,l;
1380char first = 1;
1381double size;
1382
1383DEBUG_IF printf("msDrawShadeSymbolIM\n<BR>");
1384 if(!p) return;
1385 if(p->numlines <= 0) return;
1386/* if(style->backgroundcolor.pen == MS_PEN_UNSET) msImageSetPenIM(img, &(style->backgroundcolor)); */
1387/* if(style->color.pen == MS_PEN_UNSET) msImageSetPenIM(img, &(style->color)); */
1388/* if(style->outlinecolor.pen == MS_PEN_UNSET) msImageSetPenIM(img, &(style->outlinecolor)); */
1389
1390 symbol = symbolset->symbol[style->symbol];
1391/* bc = style->backgroundcolor.pen; */
1392/* fc = style->color.pen; */
1393/* oc = style->outlinecolor.pen; */
1394 if(style->size == -1) {
1395 size = msSymbolGetDefaultSize( symbol );
1396 size = MS_NINT(size*scalefactor);
1397 }
1398 else
1399 size = MS_NINT(style->size*scalefactor);
1400 size = MS_MAX(size, style->minsize*img->resolutionfactor);
1401 size = MS_MIN(size, style->maxsize*img->resolutionfactor);
1402
1403/* DEBUG_IF printf ("a"); */
1404/* if(fc==-1 && oc!=-1) { // use msDrawLineSymbolIM() instead (POLYLINE) */
1405/* msDrawLineSymbolIM(symbolset, img, p, style, scalefactor); */
1406/* return; */
1407/* } */
1408/* DEBUG_IF printf ("b"); */
1409
1410/* if(style->symbol > symbolset->numsymbols || style->symbol < 0) return; // no such symbol, 0 is OK */
1411 if (suppressEmpty && p->numvalues==0) return;/* suppress area with empty title */
1412/* DEBUG_IF printf ("1"); */
1413/* if(fc < 0) return; // nothing to do */
1414/* DEBUG_IF printf ("2"); */
1415/* if(size < 1) return; // size too small */
1416/* DEBUG_IF printf ("3"); */
1417
1418/* DEBUG_IF printf("BEF%s", img->img.imagemap); */
1419 if(style->symbol == 0) { /* simply draw a single pixel of the specified color // */
1420 for(l=0,j=0; j<p->numlines; j++) {
1421 if (dxf == 2){
1422 im_iprintf (&imgStr, "POLY\n%d\n", matchdxfcolor(style->color));

Callers 1

msDrawShadeSymbolFunction · 0.85

Calls 4

msSymbolGetDefaultSizeFunction · 0.85
MS_NINTFunction · 0.85
im_iprintfFunction · 0.85
matchdxfcolorFunction · 0.85

Tested by

no test coverage detected