Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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>?



It'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.


Regarding (1), the mention of CSS refers specifically to SVG, not canvas.


true, but canvas does have some css things in it, such as, specifically, it uses the Color css submodule.


Oh yeah, good point.


AFAIK, 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.


Cairo & <canvas>'s drawing models are rather similar iirc.


The <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.


As are pretty much all immediate-mode 2D graphics APIs, except maybe OpenGL (when used as such).




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: