color library
Mike via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 22 01:21:42 PDT 2015
On Monday, 22 June 2015 at 07:55:16 UTC, Andrea Fontana wrote:
> Anyway I always hope to have something like antigrain (heavily
> template based library for c++, really really fast!),
> implemented in D. Maybe you should check it for some ideas.
I agree, AGG (Anti-Grain Geometry) is an excellent model to
follow, specifically for D. I've been using it in embedded
systems running at 168MHz with less than 4MB of RAM. And that
RAM is also running a lot of other stuff (libPNG, FreeType,
Modbus, and even embedded TrueType fonts. Crazy! I was actually
shocked when I got it working, and saw it perform so well.
From
http://www.antigrain.com/doc/introduction/introduction.agdoc.html
"AGG allows you to replace any part of the library, if, for
example, it doesn't fit performance requirements. Or you can add
another color space if needed. All of it is possible because of
extensive using of C++ template mechanism.
Anti-Grain Geometry is not a solid graphic library and it's not
very easy to use. I consider AGG as a “tool to create other
tools”. It means that there's no “Graphics” object or something
like that, instead, AGG consists of a number of loosely coupled
algorithms that can be used together or separately. All of them
have well defined interfaces and absolute minimum of implicit or
explicit dependencies."
It's architecture is what makes it so beautiful. You can
configure your own graphics pipeline simply by passing the right
template arguments. It would be an excellent showcase for D.
Mike
More information about the Digitalmars-d
mailing list