| 2694 | } |
| 2695 | |
| 2696 | void writeStyle(FILE *stream, int indent, styleObj *style) { |
| 2697 | |
| 2698 | indent++; |
| 2699 | writeBlockBegin(stream, indent, "STYLE"); |
| 2700 | |
| 2701 | if(style->numbindings > 0 && style->bindings[MS_STYLE_BINDING_ANGLE].item) |
| 2702 | writeAttributeBinding(stream, indent, "ANGLE", &(style->bindings[MS_STYLE_BINDING_ANGLE])); |
| 2703 | else writeNumberOrKeyword(stream, indent, "ANGLE", 360, style->angle, style->autoangle, 1, MS_TRUE, "AUTO"); |
| 2704 | |
| 2705 | writeKeyword(stream, indent, "ANTIALIAS", style->antialias, 1, MS_TRUE, "TRUE"); |
| 2706 | writeColor(stream, indent, "BACKGROUNDCOLOR", NULL, &(style->backgroundcolor)); |
| 2707 | |
| 2708 | if(style->numbindings > 0 && style->bindings[MS_STYLE_BINDING_COLOR].item) |
| 2709 | writeAttributeBinding(stream, indent, "COLOR", &(style->bindings[MS_STYLE_BINDING_COLOR])); |
| 2710 | else writeColor(stream, indent, "COLOR", NULL, &(style->color)); |
| 2711 | |
| 2712 | writeNumber(stream, indent, "GAP", 0, style->gap); |
| 2713 | |
| 2714 | if(style->_geomtransform.type != MS_GEOMTRANSFORM_NONE) { |
| 2715 | writeKeyword(stream, indent, "GEOMTRANSFORM", style->_geomtransform.type, 6, |
| 2716 | MS_GEOMTRANSFORM_BBOX, "\"bbox\"", |
| 2717 | MS_GEOMTRANSFORM_END, "\"end\"", |
| 2718 | MS_GEOMTRANSFORM_LABELPOINT, "\"labelpnt\"", |
| 2719 | MS_GEOMTRANSFORM_LABELPOLY, "\"labelpoly\"", |
| 2720 | MS_GEOMTRANSFORM_START, "\"start\"", |
| 2721 | MS_GEOMTRANSFORM_VERTICES, "\"vertices\"" |
| 2722 | ); |
| 2723 | } |
| 2724 | |
| 2725 | if(style->linecap != MS_CJC_DEFAULT_CAPS) { |
| 2726 | writeKeyword(stream,indent,"LINECAP",(int)style->linecap,5, |
| 2727 | MS_CJC_NONE,"NONE", |
| 2728 | MS_CJC_ROUND, "ROUND", |
| 2729 | MS_CJC_SQUARE, "SQUARE", |
| 2730 | MS_CJC_BUTT, "BUTT", |
| 2731 | MS_CJC_TRIANGLE, "TRIANGLE"); |
| 2732 | } |
| 2733 | if(style->linejoin != MS_CJC_DEFAULT_JOINS) { |
| 2734 | writeKeyword(stream,indent,"LINEJOIN",(int)style->linejoin,5, |
| 2735 | MS_CJC_NONE,"NONE", |
| 2736 | MS_CJC_ROUND, "ROUND", |
| 2737 | MS_CJC_BEVEL, "BEVEL", |
| 2738 | MS_CJC_MITER, "MITER"); |
| 2739 | } |
| 2740 | writeNumber(stream, indent, "LINEJOINMAXSIZE", MS_CJC_DEFAULT_JOIN_MAXSIZE , style->linejoinmaxsize); |
| 2741 | |
| 2742 | |
| 2743 | writeNumber(stream, indent, "MAXSCALEDENOM", -1, style->maxscaledenom); |
| 2744 | writeNumber(stream, indent, "MAXSIZE", MS_MAXSYMBOLSIZE, style->maxsize); |
| 2745 | writeNumber(stream, indent, "MAXWIDTH", MS_MAXSYMBOLWIDTH, style->maxwidth); |
| 2746 | writeNumber(stream, indent, "MINSCALEDENOM", -1, style->minscaledenom); |
| 2747 | writeNumber(stream, indent, "MINSIZE", MS_MINSYMBOLSIZE, style->minsize); |
| 2748 | writeNumber(stream, indent, "MINWIDTH", MS_MINSYMBOLWIDTH, style->minwidth); |
| 2749 | writeDimension(stream, indent, "OFFSET", style->offsetx, style->offsety, NULL, NULL); |
| 2750 | |
| 2751 | if(style->numbindings > 0 && style->bindings[MS_STYLE_BINDING_OPACITY].item) |
| 2752 | writeAttributeBinding(stream, indent, "OPACITY", &(style->bindings[MS_STYLE_BINDING_OPACITY])); |
| 2753 | else writeNumber(stream, indent, "OPACITY", 100, style->opacity); |
no test coverage detected