[rrd-developers] patch for legends position

Tobias Oetiker tobi at oetiker.ch
Wed Mar 18 23:43:05 CET 2009


Hi Melchior,

Today Melchior Rabe wrote:

> Hi Tobi,
>
> Tobias Oetiker wrote:
>
> > thanks very much for your patch, I will integrate it ...
>
> That's making me smile, as this is my first contribution to OSS :-)
>
> > you are right about the whole legend placeing code ... it is in
> > need of refactoring ... the code is quite old and enhanced way
> > beiond the original intention and suffers from short variable name
> > illness.
>
> If you like, I can complete the drawing that is in the zip file to document
> the thoughts I had. If there is any "style guide" or sample how to name
> variables, structures, ... I can try to enhance the code. Up to now I tried to
> keep close to the conventions that I found in the existing code.

That would be cool. there is no real style guide for variable
names, except that they should use abreviations (in general) and
they should be be word_word and not WordWord.

Here are a few thoughts on the matter.

I have not looked into this all that much, but since we are using
pango for text formatting, this could probably be leaveraged to do
more for us. At the moment, the legend placement is done 'by hand'
as you have seen in the code. Maybe pango has the ability todo the
same thing, only with less code from our side.

When the code was re-done, things like line breaks in the title and
inline font changes should not break the layout anymore ...

backward compatibility is realy important to me, so the api and
commandline interface should remain or if you come up with some
cool new ideas, the old interface should be emulated (as it is done
for graph by graph_v)


looking forward to your ideas.

cheers
tobi


> Cheers,
>
> Melchior
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list