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

Function msDrawMarkerSymbolIM

mapimagemap.c:944–1159  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

942/* Draw a single marker symbol of the specified size and color */
943/* ------------------------------------------------------------------------- */
944void msDrawMarkerSymbolIM(symbolSetObj *symbolset, imageObj* img, pointObj *p, styleObj *style, double scalefactor)
945{
946 symbolObj *symbol;
947/* int offset_x, offset_y, x, y;
948 int j;
949 gdPoint oldpnt,newpnt;
950 gdPoint mPoints[MS_MAXVECTORPOINTS];
951
952 gdImagePtr tmp;
953 int tmp_fc=-1, tmp_bc, tmp_oc=-1;
954*/ int fc, bc, oc;
955/* double d;
956
957
958 int bbox[8];
959 rectObj rect;
960 char *font=NULL;
961*/
962 int ox, oy;
963 double size;
964
965DEBUG_IF printf("msDrawMarkerSymbolIM\n<BR>");
966
967/* skip this, we don't do text */
968
969
970
971 if(!p) return;
972
973/* if(style->backgroundcolor.pen == MS_PEN_UNSET) msImageSetPenIM(img, &(style->backgroundcolor)); */
974/* if(style->color.pen == MS_PEN_UNSET) msImageSetPenIM(img, &(style->color)); */
975/* if(style->outlinecolor.pen == MS_PEN_UNSET) msImageSetPenIM(img, &(style->outlinecolor)); */
976
977 symbol = symbolset->symbol[style->symbol];
978 bc = style->backgroundcolor.pen;
979 fc = style->color.pen;
980 oc = style->outlinecolor.pen;
981 ox = style->offsetx*scalefactor;
982 oy = style->offsety*scalefactor;
983 if(style->size == -1) {
984 size = msSymbolGetDefaultSize( symbol );
985 size = MS_NINT(size*scalefactor);
986 }
987 else
988 size = MS_NINT(style->size*scalefactor);
989 size = MS_MAX(size, style->minsize*img->resolutionfactor);
990 size = MS_MIN(size, style->maxsize*img->resolutionfactor);
991
992 if(style->symbol > symbolset->numsymbols || style->symbol < 0) return; /* no such symbol, 0 is OK */
993/* if(fc<0 && oc<0) return; // nothing to do */
994 if(size < 1) return; /* size too small */
995
996/* DEBUG_IF printf(".%d.%d.%d.", symbol->type, style->symbol, fc); */
997 if(style->symbol == 0) { /* simply draw a single pixel of the specified color */
998/* gdImageSetPixel(img, p->x + ox, p->y + oy, fc); */
999
1000 if (dxf) {
1001 if (dxf==2)

Callers 1

msDrawMarkerSymbolFunction · 0.85

Calls 4

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

Tested by

no test coverage detected