[cairo] Where are the stroking (and filling) guts?
lrg_ml at gmx.net
Thu Jul 1 13:09:59 PDT 2010
thank you for your reply. I have had a quick look at the
visualization of the algorithm, it's quite helpful. I'm looking
forward to also look at your code as soon as I can find the time. It
will be fun to see some Go code, so far I haven't had a reason to
get into it.
On Thu, Jul 01, 2010 at 11:39:24AM +1000, Nigel Tao wrote:
> On 30 June 2010 11:22, Lutz Gehlen <lrg_ml at gmx.net> wrote:
> > I would like to learn a bit more about stroking and filling is done
> > in modern graphics software, mainly out of academic interest. I am
> > particularly interested in thick stroking including antialiasing,
> > but also in filling.
> It's not cairo, but I recently ported  the freetype rasterizer to
> the Go programming language . It's an all-software scanline
> rasterizer (and IIUC the same algorithm that is used by the anti-grain
> library) and a Lisp programmer has written a nice visualization of
> that algorithm .
> The freetype-go rasterizer code is relatively small (it's only 1370
> lines of code), including some stroking code I added this week (it
> does stroke-to-path), so it should be relatively easy to understand (I
> also haven't done any performance work, stress testing or corner-case
> QA'ing yet). I haven't got my head around Bentley&Ottmann yet but if
> you understand the cubic Bézier approximation to the quarter-circle
> then you should be able to follow the math in the stroking algorithm.
> I'd be curious to know how it compares with other rasterization
> algorithms (in quality as well as performance) whether from research
> literature or from other graphics libraries.
>  http://code.google.com/p/freetype-go/
>  http://golang.org/
>  http://projects.tuxee.net/cl-vectors/section-the-cl-aa-algorithm
> cairo mailing list
> cairo at cairographics.org
More information about the cairo