Changeset 370 for trunk/zoo-project/zoo-kernel/service_internal_ms.c
- Timestamp:
- Oct 10, 2012, 10:11:10 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_ms.c
r366 r370 1 1 #ifdef USE_MS 2 2 #ifndef WIN32 3 #define CLASS class 4 #else 5 #define CLASS _class 6 #endif 3 7 #include "service_internal_ms.h" 4 8 … … 555 559 if(msGrowLayerClasses(myLayer) == NULL) 556 560 return -1; 557 if(initClass((myLayer-> _class[myLayer->numclasses])) == -1)561 if(initClass((myLayer->CLASS[myLayer->numclasses])) == -1) 558 562 return -1; 559 myLayer-> _class[myLayer->numclasses]->type = myLayer->type;560 if(msGrowClassStyles(myLayer-> _class[myLayer->numclasses]) == NULL)563 myLayer->CLASS[myLayer->numclasses]->type = myLayer->type; 564 if(msGrowClassStyles(myLayer->CLASS[myLayer->numclasses]) == NULL) 561 565 return -1; 562 if(initStyle(myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]) == -1)566 if(initStyle(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]) == -1) 563 567 return -1; 564 568 … … 568 572 tmpMap=getMap(output->content,"msStyle"); 569 573 if(tmpMap!=NULL) 570 msUpdateStyleFromString(myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles],tmpMap->value,0);574 msUpdateStyleFromString(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles],tmpMap->value,0); 571 575 else{ 572 576 /** 573 577 * Set style 574 578 */ 575 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.red=125;576 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.green=125;577 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.blue=255;578 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinecolor.red=80;579 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinecolor.green=80;580 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinecolor.blue=80;579 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.red=125; 580 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.green=125; 581 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.blue=255; 582 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinecolor.red=80; 583 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinecolor.green=80; 584 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinecolor.blue=80; 581 585 582 586 /** … … 584 588 */ 585 589 if(myLayer->type == MS_LAYER_POLYGON) 586 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->width=3;590 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->width=3; 587 591 if(myLayer->type == MS_LAYER_LINE){ 588 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->width=3;589 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinewidth=1.5;592 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->width=3; 593 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinewidth=1.5; 590 594 } 591 595 if(myLayer->type == MS_LAYER_POINT){ 592 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->symbol=1;593 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->size=15;594 } 595 596 } 597 myLayer-> _class[myLayer->numclasses]->numstyles++;596 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->symbol=1; 597 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->size=15; 598 } 599 600 } 601 myLayer->CLASS[myLayer->numclasses]->numstyles++; 598 602 myLayer->numclasses++; 599 603 m->layerorder[m->numlayers] = m->numlayers; … … 795 799 if(msGrowLayerClasses(myLayer) == NULL) 796 800 return -1; 797 if(initClass((myLayer-> _class[myLayer->numclasses])) == -1)801 if(initClass((myLayer->CLASS[myLayer->numclasses])) == -1) 798 802 return -1; 799 myLayer-> _class[myLayer->numclasses]->type = myLayer->type;800 if(msGrowClassStyles(myLayer-> _class[myLayer->numclasses]) == NULL)803 myLayer->CLASS[myLayer->numclasses]->type = myLayer->type; 804 if(msGrowClassStyles(myLayer->CLASS[myLayer->numclasses]) == NULL) 801 805 return -1; 802 if(initStyle(myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]) == -1)806 if(initStyle(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]) == -1) 803 807 return -1; 804 808 … … 808 812 char className[7]; 809 813 sprintf(className,"class%d",i); 810 myLayer-> _class[myLayer->numclasses]->name=strdup(className);814 myLayer->CLASS[myLayer->numclasses]->name=strdup(className); 811 815 812 816 /** … … 818 822 else 819 823 sprintf(expression,"([pixel]>=%.3f AND [pixel]<=%.3f)",cstep,cstep+interval); 820 msLoadExpressionString(&myLayer-> _class[myLayer->numclasses]->expression,expression);824 msLoadExpressionString(&myLayer->CLASS[myLayer->numclasses]->expression,expression); 821 825 822 826 /** 823 827 * Set color 824 828 */ 825 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.red=_tmpColors[i][0];826 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.green=_tmpColors[i][1];827 myLayer-> _class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.blue=_tmpColors[i][2];829 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.red=_tmpColors[i][0]; 830 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.green=_tmpColors[i][1]; 831 myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.blue=_tmpColors[i][2]; 828 832 cstep+=interval; 829 myLayer-> _class[myLayer->numclasses]->numstyles++;833 myLayer->CLASS[myLayer->numclasses]->numstyles++; 830 834 myLayer->numclasses++; 831 835
Note: See TracChangeset
for help on using the changeset viewer.