[cairo] integer world coordinate system

M Joonas Pihlaja jpihlaja at cc.helsinki.fi
Wed Aug 18 04:02:56 PDT 2010


On Wed, 18 Aug 2010, M.R. wrote:

> Our application takes a multi-dimensional physical model of reality and
> "flattens" it into something that can be shown on a screen or printed
> page. We end up with large "poly-line" coordinate arrays. Memory
> is an issue.

Currently cairo stores paths internally as integers, so there's no 
memory penalty from using doubles at the API level.

[snip flattening procedure]

> This will yield a line that has used as few expensive computations 
> as possible, yet be rendered with maximum granularity the display is 
> capable of.

You're free to pass integers to the cairo API.  They'll first be 
converted into doubles and then back to integers internally by cairo.  


More information about the cairo mailing list