[rrd-developers] Re: abstraction from libart

Burton Strauss Burton at ntopSupport.com
Tue May 17 00:26:21 MEST 2005


As long as you are doing all the work :-), how about making it dynamic?
<grin, duck and run />

Compile all of them you find are possible and then use the 'best' one which
really exists at run time.

This would make rrdtool a lot less complex to package, and/or avoid the
problems we've had with 1.0.x pulling in half of XFree86...

-----Burton
 

-----Original Message-----
From: rrd-developers-bounce at list.ee.ethz.ch
[mailto:rrd-developers-bounce at list.ee.ethz.ch] On Behalf Of Gifford Hesketh
Sent: Monday, May 16, 2005 4:57 PM
To: Tobias Oetiker
Cc: rrd-developers at list.ee.ethz.ch
Subject: [rrd-developers] Re: abstraction from libart

On 5/16/05, Tobias Oetiker <oetiker at ee.ethz.ch> wrote:
> Hi Gifford,
> 
> 
> > 1.  libart is relatively unmaintained The author has been busy with 
> > his thesis, and gnome developers seem to be leaning toward cairo (at 
> > least Novell's mono team).
> 
> the problem is that when I last looked at cairo it was not exactly 
> attractive to be used as a replacement ... sort of 'not there yet'
> 
> what seemed to be a more attractive option was
> 
> http://antigrain.com/index.html
> 
> this unfortunately is very c++ so I gave up on it ... but if someone 
> wants to contribute C bindings this looks VERY cool.

Yes, I would still call cairo "experimental" -- but I like the amount of
attention it is getting from Novell.  I had also found AGG and, like you,
not wanted to mess with the C++ integration -- at least not yet.

> 
> > 2.  other packages may offer more features For some, it may be 
> > desirable to sacrifice some performance in order to gain more 
> > capability.  I do not know how the performance of ImageMagick, for 
> > example, compares with libart, but ImageMagick offers many more 
> > output formats.
> 
> the question is what features you are looking for ...

There are not additional features that I need right now, but maybe someone
else wants something that ImageMagick or other software can offer.  Being
able to generate MPEG movies might be cool.

> > I have been reviewing rrdtool, libart, cairo, and GDI+ and have some 
> > specific suggestions to make, if they would be useful.
> 
> sure by all means ...
> 
> as soon as 1.2.x slows in bug pace I will open 1.3.x and new things 
> can be tried ...
> 
> cheers
> tobi

I will try to complete and maintain the work I have been doing for 1.2.x
until the 1.3 branch.  My rrd_gfx interface definitions currently look like
this:


struct gfx_point_t
{
	double x;
	double y;
};
typedef struct gfx_point_t gfx_point_t;

struct gfx_rect_t
{
	double x;
	double y;
	double width;
	double height;
};
typedef struct gfx_rect_t gfx_rect_t;

struct gfx_size_t
{
	double width;
	double height;
};
typedef struct gfx_size_t gfx_size_t;


#ifdef HAVE_CAIRO
#include "rrd_gfx_cairo.h"
#endif

#ifdef HAVE_GDIPLUS
#include "rrd_gfx_gdiplus.h"
#endif

#ifdef HAVE_IMAGEMAGICK
#include "rrd_gfx_imagemagick.h"
#endif

#ifdef HAVE_LIBART
#include "rrd_gfx_libart.h"
#endif


//
// canvas
//
gfx_canvas_t * gfx_canvas_create( gfx_image_t * image ); int
gfx_canvas_delete( gfx_canvas_t * canvas ); int gfx_canvas_render(
gfx_canvas_t * canvas, gfx_image_t * image ); 

//
// circle
//
int gfx_circ_draw( gfx_canvas_t * canvas, gfx_pen_t * pen, gfx_point_t
* center, double radius );

//
// color
//
gfx_color_t * gfx_color_create( unsigned int rgb, unsigned int alpha ); int
gfx_color_delete( gfx_color_t * color ); 

//
// font
//
gfx_font_t * gfx_font_create( gfx_canvas_t * canvas, char * face, double
size ); int gfx_font_delete( gfx_font_t * font );

//
// image
//
gfx_image_t * gfx_image_create( char * filename, char * format, unsigned int
width, unsigned int height ); int gfx_image_delete( gfx_image_t * image );
gfx_size_t gfx_image_size( char * filename );

//
// line
//
int gfx_line_dash( gfx_canvas_t * canvas, gfx_pen_t * pen, gfx_point_t
* p1, gfx_point_t * p2 );
int gfx_line_draw( gfx_canvas_t * canvas, gfx_pen_t * pen, gfx_point_t
* p1, gfx_point_t * p2 );

//
// path
//
int gfx_path_append( gfx_path_t * path, gfx_point_t * point, int options );
gfx_path_t * gfx_path_create( gfx_canvas_t * canvas, unsigned int size );
int gfx_path_finish( gfx_path_t * path ); int gfx_path_delete( gfx_path_t *
path );

//
// pen
//
gfx_pen_t * gfx_pen_create( gfx_canvas_t * canvas, gfx_color_t * color,
double width ); int gfx_pen_delete( gfx_pen_t * pen );

//
// rectangle
//
int gfx_rect_draw( gfx_canvas_t * canvas, gfx_pen_t * pen, gfx_rect_t * rect
);

//
// text
//
int gfx_text_draw( gfx_canvas_t * canvas, gfx_font_t * font, gfx_rect_t *
rect, char * text, int tabsize, float rotation ); gfx_size_t gfx_text_size(
gfx_canvas_t * canvas, gfx_font_t * font, char * text, int tabsize, float
rotation );

--
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://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

--
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://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list