From a3afec0686fd0418e82f04b00cb2f3a3d513113c Mon Sep 17 00:00:00 2001 From: Alan Boudreault Date: Wed, 16 May 2012 11:39:36 +0000 Subject: [PATCH] Fix creation of a vector symbolObj in mapscript (#4318) --- HISTORY.TXT | 2 ++ mapscript/swiginc/symbol.i | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/HISTORY.TXT b/HISTORY.TXT index e7bbe8a5b2..f503153251 100644 --- a/HISTORY.TXT +++ b/HISTORY.TXT @@ -14,6 +14,8 @@ For a complete change history, please see the Git log comments. Current Version (git master, 6.1-dev, future 6.2): ------------------------------------------------- +- Fix creation of a vector symbolObj in mapscript (#4318) + - Added coverage metadata in WCS (#4306) - Ignore unknown requets parameteres in WCS 2.0 (#4307). diff --git a/mapscript/swiginc/symbol.i b/mapscript/swiginc/symbol.i index fe6f832e85..5d8b413397 100644 --- a/mapscript/swiginc/symbol.i +++ b/mapscript/swiginc/symbol.i @@ -67,8 +67,12 @@ int setPoints(lineObj *line) { int i; + self->sizex = 0; + self->sizey = 0; for (i=0; inumpoints; i++) { MS_COPYPOINT(&(self->points[i]), &(line->point[i])); + self->sizex = MS_MAX(self->sizex, self->points[i].x); + self->sizey = MS_MAX(self->sizey, self->points[i].y); } self->numpoints = line->numpoints; return self->numpoints;