[mapserver-commits] r11516 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Apr 11 05:25:36 EDT 2011
Author: tbonfort
Date: 2011-04-11 02:25:36 -0700 (Mon, 11 Apr 2011)
New Revision: 11516
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapfile.c
trunk/mapserver/mapserver.h
trunk/mapserver/mapsymbol.c
Log:
add GAP, POSITION and CAPS/JOINS to mapfile writer (#3797)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2011-04-10 11:34:36 UTC (rev 11515)
+++ trunk/mapserver/HISTORY.TXT 2011-04-11 09:25:36 UTC (rev 11516)
@@ -15,6 +15,8 @@
Current Version (SVN trunk):
----------------------------
+- add GAP, POSITION and CAPS/JOINS to mapfile writer (#3797)
+
- fix GEOMTRANSFORM rotation orientation for vector symbols (#3802)
- GD Driver broken in FastCGI (#3813)
Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c 2011-04-10 11:34:36 UTC (rev 11515)
+++ trunk/mapserver/mapfile.c 2011-04-11 09:25:36 UTC (rev 11516)
@@ -2383,9 +2383,9 @@
style->patternlength = 0; /* solid line */
style->gap = 0;
style->position = MS_CC;
- style->linecap = MS_CJC_ROUND;
- style->linejoin = MS_CJC_NONE;
- style->linejoinmaxsize = 3;
+ style->linecap = MS_CJC_DEFAULT_CAPS;
+ style->linejoin = MS_CJC_DEFAULT_JOINS;
+ style->linejoinmaxsize = MS_CJC_DEFAULT_JOIN_MAXSIZE;
style->numbindings = 0;
for(i=0; i<MS_STYLE_BINDING_LENGTH; i++) {
@@ -2688,7 +2688,27 @@
if(style->numbindings > 0 && style->bindings[MS_STYLE_BINDING_COLOR].item)
writeAttributeBinding(stream, indent, "COLOR", &(style->bindings[MS_STYLE_BINDING_COLOR]));
else writeColor(stream, indent, "COLOR", &(style->color));
+
+ writeNumber(stream, indent, "GAP", 0, style->gap);
+ if(style->linecap != MS_CJC_DEFAULT_CAPS) {
+ writeKeyword(stream,indent,"LINECAP",(int)style->linecap,5,
+ MS_CJC_NONE,"NONE",
+ MS_CJC_ROUND, "ROUND",
+ MS_CJC_SQUARE, "SQUARE",
+ MS_CJC_BUTT, "BUTT",
+ MS_CJC_TRIANGLE, "TRIANGLE");
+ }
+ if(style->linejoin != MS_CJC_DEFAULT_JOINS) {
+ writeKeyword(stream,indent,"LINEJOIN",(int)style->linejoin,5,
+ MS_CJC_NONE,"NONE",
+ MS_CJC_ROUND, "ROUND",
+ MS_CJC_BEVEL, "BEVEL",
+ MS_CJC_MITER, "MITER");
+ }
+ writeNumber(stream, indent, "LINEJOINMAXSIZE", MS_CJC_DEFAULT_JOIN_MAXSIZE , style->linejoinmaxsize);
+
+
writeNumber(stream, indent, "MAXSCALEDENOM", -1, style->maxscaledenom);
writeNumber(stream, indent, "MAXSIZE", MS_MAXSYMBOLSIZE, style->maxsize);
writeNumber(stream, indent, "MAXWIDTH", MS_MAXSYMBOLWIDTH, style->maxwidth);
@@ -2721,6 +2741,13 @@
indent--;
}
+ if(style->position != MS_CC) {
+ writeKeyword(stream, indent, "POSITION", style->position, 9,
+ MS_UL, "UL", MS_UC, "UC", MS_UR, "UR", MS_CL, "CL",
+ MS_CC, "CC", MS_CR, "CR", MS_LL, "LL", MS_LC, "LC",
+ MS_LR, "LR");
+ }
+
if(style->numbindings > 0 && style->bindings[MS_STYLE_BINDING_SIZE].item)
writeAttributeBinding(stream, indent, "SIZE", &(style->bindings[MS_STYLE_BINDING_SIZE]));
else writeNumber(stream, indent, "SIZE", -1, style->size);
Modified: trunk/mapserver/mapserver.h
===================================================================
--- trunk/mapserver/mapserver.h 2011-04-10 11:34:36 UTC (rev 11515)
+++ trunk/mapserver/mapserver.h 2011-04-11 09:25:36 UTC (rev 11516)
@@ -454,6 +454,11 @@
enum MS_ALIGN_VALUE {MS_ALIGN_LEFT, MS_ALIGN_CENTER, MS_ALIGN_RIGHT};
enum MS_CAPS_JOINS_AND_CORNERS {MS_CJC_NONE, MS_CJC_BEVEL, MS_CJC_BUTT, MS_CJC_MITER, MS_CJC_ROUND, MS_CJC_SQUARE, MS_CJC_TRIANGLE};
+
+#define MS_CJC_DEFAULT_CAPS MS_CJC_ROUND
+#define MS_CJC_DEFAULT_JOINS MS_CJC_NONE
+#define MS_CJC_DEFAULT_JOIN_MAXSIZE 3
+
enum MS_RETURN_VALUE {MS_SUCCESS, MS_FAILURE, MS_DONE};
enum MS_IMAGEMODE { MS_IMAGEMODE_PC256, MS_IMAGEMODE_RGB, MS_IMAGEMODE_RGBA, MS_IMAGEMODE_INT16, MS_IMAGEMODE_FLOAT32, MS_IMAGEMODE_BYTE, MS_IMAGEMODE_FEATURE, MS_IMAGEMODE_NULL };
Modified: trunk/mapserver/mapsymbol.c
===================================================================
--- trunk/mapserver/mapsymbol.c 2011-04-10 11:34:36 UTC (rev 11515)
+++ trunk/mapserver/mapsymbol.c 2011-04-11 09:25:36 UTC (rev 11516)
@@ -47,12 +47,6 @@
static const unsigned char PNGsig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; /* 89 50 4E 47 0D 0A 1A 0A hex */
static const unsigned char JPEGsig[3] = {255, 216, 255}; /* FF D8 FF hex */
-/*
-** Symbol to string static arrays needed for writing map files.
-** Must be kept in sync with enumerations and defines found in mapserver.h.
-*/
-extern char *msPositionsText[]; /* Defined in mapfile.c */
-static char *msCapsJoinsCorners[7]={"NONE", "BEVEL", "BUTT", "MITER", "ROUND", "SQUARE", "TRIANGLE"};
void freeImageCache(struct imageCacheObj *ic)
{
More information about the mapserver-commits
mailing list