an insider’s guide to cairo

what is cairo

rendering model

through the scarab’s belly

stroking

is stroking that hard?

is stroking that hard?

cubic Bezier splines

deCastlejau algorithm

1) find 3 midpoints

2) find 2 new midpoints

3) final midpoint is on spline

4) two sub-splines fall out

let’s try stroking

let’s try stroking

let’s try stroking

now simplify the pen

ooh, pretty colors

...but ugly lumps

approximate the spline first

is this progress?

cleaning up...

...and add the pen

tessellation

the corner case

missed intersections

tolerance square

a correct result

rasterization/compositing