Graphics Library for D
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Tue Jan 7 04:29:58 PST 2014
On Tuesday, 7 January 2014 at 12:11:49 UTC, qznc wrote:
> On Monday, 6 January 2014 at 19:13:19 UTC, Ola Fosheim Grøstad
> Cairo supports defining paths and then drawing/filling them.
Yes, but it is pragmatic in the sense that it apparently makes
approximations to arc (circle/ellipsis) and use more expensive
cubic primitives for quad beziers. Efficient fonts are often
specified as the cheaper quadratic beziers. Cubic beziers look
better, but are more expensive. Maybe the backends turn the
cubics back into quads, I dunno. I've just looked at the internal
path representation.
SVG covers a lot more ground, though. Including image fills,
filtereffects and animation.
> I used Cairo (via GtkD) to produce pdf documents. The pdf and
> png backends are probably pretty unique for a graphics 2D
> library. Most just target a screen.
I agree that Cairo is cool.
I would personally rather see SVG in a standard library since
that is actually the most common vector graphics file format
(Inkscape++) and vector engine DOM: IE9+, Firefox, Chrome, Safari
etc.
I've just looked at the cinder api, and it looks like an internal
library pushed to the public (and yes, it apparently is):
http://libcinder.org/docs/v0.8.5/hierarchy.html
If one want a simple api for messing around with graphics then
probably Cairo or Processing would be a better choice, they are
at least very popular. Cinder is probably in the difficult
intermediate position, not easy enough for most dabblers, and not
powerful enough for those who have a strong interest in graphics.
If you want something that actually is standard, then the SVG DOM
is the only choice, IMHO.
More information about the Digitalmars-d
mailing list