4 ms·
It's not quite the Java 2D API, but damned it's close. Why not just knock off a good API, like that for <canvas>?
by angersock 13y ago
It's not quite the Java 2D API, but damned it's close.
Why not just knock off a good API, like that for <canvas>?
- adamnemecek 13y agoAFAIK, Cairo is said to be the bee's knees. As in, I've heard multiple people refer to it as a yardstick of good library design.
- TheZenPsycho 13y agoIt's covered in the linked document. To paraphrase: 1. It includes some extraneous things such as some CSS stuff. 2. There is some evidence that some of the canvas api may be covered by patents.
- robin_reala 13y agoRegarding (1), the mention of CSS refers specifically to SVG, not canvas.
- TheZenPsycho 13y agotrue, but canvas does have some css things in it, such as, specifically, it uses the Color css submodule.
- robin_reala 13y agoOh yeah, good point.
- fyolnish 13y agoCairo & <canvas>'s drawing models are rather similar iirc.
- ygra 13y agoAs are pretty much all immediate-mode 2D graphics APIs, except maybe OpenGL (when used as such).
- thristian 13y agoThe <canvas> drawing model is a very thin layer over the Mac OS X Cocoa drawing model (because it was originally developed by Apple as a proprietary extension to Webkit). The Cocoa drawing model is based on the "Display PDF" model, which is a descendant of the "Display Postscript" system used by the original NeXT OS, which of course was derived from the PostScript page layout language. I think Cairo just borrowed the PostScript drawing model from the start.