MapServer / MapServer-import

3 stars 2 forks source link

shapeObj.draw & rectObj.draw use incorrect style to draw #1494

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: szekerest Date: 2005/10/09 - 22:15

shapeObj.draw and rectObj.draw always draw using a style with index = 1 even 
if the class has only one style (with index = 0). In the latter case 
msDrawShape uses uninitialized style to draw.

To fix this issue shape.i (line 85) should be modifyed to

return msDrawShape(map, layer, self, image, -1);

and rect.i (line 66) should be modifyed to

msDrawShape(map, layer, &shape, image, -1);

respectively.

Tamas Szekeres
tbonfort commented 12 years ago

Author: szekerest Date: 2005/10/11 - 17:41

Reassigned as for #1491
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2005/10/11 - 17:49

Tamas, the class index is carried into msDrawShape by the shapeObj:

    shape.classindex = 2
    shape.draw(map, layer, image)

Do I misunderstand you?
tbonfort commented 12 years ago

Author: szekerest Date: 2005/10/11 - 20:30

Sean,

For shapeObj.draw the shape.i contains the followings:

int draw(mapObj *map, layerObj *layer, imageObj *image) {
        return msDrawShape(map, layer, self, image, MS_TRUE);
    }

There is a confusion with the 5. parameter of msDrawShape which nomally 
contains the index if the style. It should be -1 to draw all the styles. This 
applies to rectObj.draw as well.

Tamas
tbonfort commented 12 years ago

Author: sdlime Date: 2005/10/11 - 20:51

Good catch. I have made the change and committed to CVS...

Steve
tbonfort commented 12 years ago

Author: sdlime Date: 2005/11/28 - 15:10

Tamas: Can you confirm this one?

Steve
tbonfort commented 12 years ago

Author: szekerest Date: 2005/12/05 - 21:27

Steve

This change works properly. You can close this bug.

For additional comments see:

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1466

Tamas Szekeres
tbonfort commented 12 years ago

Author: sdlime Date: 2005/12/05 - 21:33

Marking as closed.