Missing features

This page lists all features and API missing from cairo. Where missing is defined as features that large/common users of cairo need to provide fallbacks and work arounds for when using cairo. For example SVG libraries like librsvg uses fallbacks to implement bitmap filters and certain blend modes. The aim is make sure things that fall within the scope of cairo is indeed done in cairo.

Target users: librsvg,gecko/mozilla,inkscape

List References: http://lists.freedesktop.org/archives/cairo/2007-April/010325.html http://lists.freedesktop.org/archives/cairo/2007-January/009268.html

Discussion: http://lists.freedesktop.org/archives/cairo/2007-January/009268.html

Bitmap Filters

Bitmap filters are harder to quantify since the amount of possible filters are infinite. The aim should be possibly to implement the most commonly used filters eg. blur and provide some kind of callback to implement arbitrary effects. Multiple filters per pattern/surface is also required. The SVG filters http://www.w3.org/TR/SVGFilter12/ Box blur - see http://www.kaourantin.net/2005/08/implementing-blur-filter-in-flash.html

"compiz would use Cairo if it supported a Gaussian blur."

CSS3 borders

CSS3 proposes additions to border rendering that are currently not expressible in Cairo. In particular, top/left/bottom/right borders can have different styles (color, line width) and the new border-radius property can do rounded corners. So a way to stroke a non-trivial dashed path with different patterns and line widths is required. current CSS3 border working draft: <http://www.w3.org/TR/2008/WD-css3-background-20080910/#border examples: http://ktown.kde.org/~fredrik/brtests/

Implementation Considerations

An interesting development related to this is the Pixel Bender toolkit (http://www.adobe.com/devnet/pixelbender.html) which allows bitmap effects and blend modes to be written in a GLSL derived pixel language that can be executed on the CPU or the GPU. There are rumours of it going to be open sourced. LLVM could be used to implement something similar while taking advantage of optimizations on multiple architectures.

Speaking of LLVM, it's what Apple uses in its software accross hardware (mac,iphone,macpro) to provide fast software implementations of features lacking in GPU on specific hardware.

Java2D has a similar flexible method.

Cairo API Considerations