pre rfc draft on rendering

Tamas Szekeres szekerest at GMAIL.COM
Fri Nov 9 15:11:23 EST 2007

Hi Thomas,

That's really cool :)  I'm quite impressed by the idea. Here are some questions?

1. Which object would carry the vtable in your opinion? Would you
attach that directly to the imageObj or a new struct for the renderer
should be introduced?
We could possibly use:

int msDrawVectorLayer(image, layer) {

// go through the features
image->drawShape(image, shape);

// renderer specific

int DrawShape(image, shape.) {
 do some size, width, etc adjustments with respect to minsize,
maxsize, scalefactor, etc
then depending on the symbol type, switch off to a render specific
function (possibly pointed at by a vtable structure):
  if vector symbol
    return image->DrawShapeVector(image, shape, vector points, color,
angle ...);
  else if truetype symbol
    return image->DrawShapeTruetype(image, shape, font file,
character, color, angle ...);

2. It would be useful to separate the functions implemented by
renderers (in vtable) from the  renderer independent functions. Would
a renderer be able to override the drawLayer for example?

3. How would you change the imageObj for holding the renderer
dependent image representation. Would it be a 'void * imagedata' or
something like that?

4. How the renderers would be plugged in?

Best regards,


2007/11/9, thomas bonfort <thomas.bonfort at>:
> hi all,
> I'm currently looking at cleaning up / avoiding code duplication /
> easier additions / etc... for the rendering side of mapserver. I've
> put up some working notes at
> and would like to hear your comments/suggestions/flaming/etc...
> thomas

More information about the mapserver-dev mailing list