pre rfc draft on rendering

thomas bonfort thomas.bonfort at GMAIL.COM
Sat Nov 10 10:46:26 EST 2007


On Nov 9, 2007 9:11 PM, Tamas Szekeres <szekerest at gmail.com> wrote:
> 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?
The way its done now with agg is to attach it to the imageObj, but
this does have quite a few limitations, notably in respect to font
rendering (font cache is independant of the imageObj, as well getting
the bouding box of a label for the label collision detection). So I'd
tend to say that a new struct would be better.

> We could possibly use:
>
> int msDrawVectorLayer(image, layer) {
>
> // go through the features
> image->drawShape(image, shape);

ha, that obviously seems like a simpler way to go, thanks. I'll have
to check though if its worth it, as there are some of the style
parameters that are adjusted differently depending on the type of
layer.

>
> 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?

can you give an example of when this would be usefull ?

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

very probably, that seems to be the only dirty but c-compatible way of
accepting anything. If you have other ideas I'd be glad to have them.

>
> 4. How the renderers would be plugged in?
that's too much for my limited experience in the subject. For the time
being the aim is only to have the renderers present a common
interface.
>

 thanks for the insightful coments!

 thomas



More information about the mapserver-dev mailing list