Tango Graphics Package

Bill Baxter dnewsgroup at billbaxter.com
Thu Jul 12 20:37:59 PDT 2007

Mike Parker wrote:
> Bill Baxter wrote:
>> Mike Parker wrote:
>> Are you using a nice anti-aliased renderer to do the pixel pushing? 
>> Something like AGG ported to D would be cool.  It seems to be aiming 
>> at about the right level -- cross platform, only knows how to render 
>> to bitmaps internally.  I know there are folks using AGG for server 
>> side image gen (if not directly then at least thorough Matplotlib, 
>> which uses AGG as its renderer).
>> --bb
> I thought about porting AGG, but two things stopped me. For one, the 
> design is rather horrid, IMO. It's a PITA to use and seems it would be 
> an even bigger PITA to port. 

Well, yeh, but once you get your head around it, and wrap it with a 
decent API, then it works quite nicely.  But that's in C++.  It would 
certainly not be trivial to port it to D.  The only thing you would 
really want to port would be the core operators and stream processors. 
Like the code used to generate offsets to paths (agg_conv_stroke) and 
the code that generates spans from geometry and fills them.

The real killer, though, is that the
> current version (2.5, IIRC) is GPL. The previous version has a 
> less-restrictive license, but there's so much similarity between the two 
> versions it just doesn't seem like a good idea.

So stick with AGG 2.4, which is a BSD-ish, I think.  I believe that's 
what a lot of AGG users are doing.  There was a little discussion about 
setting up a FreeAGG project somewhere just to maintain bug fixes, but 
at the time it was proposed, people were still hoping Maxim would change 
his mind about going GPL.

> For what we have right now, we're using a custom rasterizer and haven't 
> yet implemented AA. I'm open to porting an existing rasterizer if 
> there's a good one out there with a reasonable license.

AGG 2.4 is the best thing I know of -- small, light, fast, with good 
quality raster output.  But only raster output.  Cairo is obviously 
another candidate.  It aims to be cross platform and does support lots 
of back-ends (raster, ps, pdf, etc).   I guess it depends on how 
grandiose your goals are and how much time you realistically have to 
spend on the project.


More information about the Digitalmars-d-announce mailing list