[rrd-developers] Re: [patch] stringwidth patch for SVG etc.
Tobias Oetiker
oetiker at ee.ethz.ch
Mon Apr 1 20:44:56 MEST 2002
Saturday Peter Speck wrote:
Hi Peter,
> The files have the generic afm names: rrd_afm.h/c and rrd_afm_data.h/c
> as the afm font info will be useful for implementing EPS/PDF formats as
> they use the same font metrics. I'll implement the EPS format in a few
> days.
tobi is happy about this ... very cool ...
> As gfx_get_text_width() doesn't have gfx_canvas_t as param, I needed to
> hack a parameter for knowing if it should use FreeType or AFM.
> Some of the functions that call gfx_get_text_width() doesn't have
> gfx_canvas_t as param either, so I've made a quick hack that I think
> should be rethought:
Well, I have no problem adding the canvas object pointer to the
textwidth call ... but this shows an issue we might have, in the
sense that we should know what output format we are going to create
when the canvas is created ... this is sad, because I was hoping to
end up with something where the decision on how the output is going
to look like will be decided upon calling the output function ...
so ultimately it would be possible to all rrdtool once and produce
output in all the formats is supports ...
but then again, as we have to know the space used up by text while
placing the legend elements, this may not be possible anyway ...
so how about adding modifying the canvas create call to also take
the output format as an option, require the text width call to
have a canvas pointer and have the output generation function use
the information from the canvas to determine what sort of output it
should generate ?
could you modify your patch accordingly ?
tobi
--
______ __ _
/_ __/_ / / (_) Oetiker, ETZ J97, ETH, 8092 Zurich, Switzerland
/ // _ \/ _ \/ / phoneto:+41(0)1-632-5286 faxto:+41(0)1-632-1517
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://google.com/search?q=tobi
--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-developers
mailing list