FAQ
Hello,

I'd like to announce Golang bindings for the Cairo graphics library:
   https://godoc.org/github.com/martine/gocairo/cairo

There are other projects which aim to do the same thing [1], [2], [3].
  However, all are incomplete -- compare the lengths of the relevant godoc
links -- and some appear abandoned.

I aimed to make this one complete and regular by taking an alternative
approach: I parse the C header to gather all the functions and types and
then generate the wrapper (in an idiomatic Go style) from there.

Caveats:
- I've written some example programs
at https://github.com/martine/gocairo/tree/master/example but I haven't
verified all the API works as expected.
- This implementation is still missing some of the advanced Cairo functions
such as text glyph/cluster management, raster sources, and some of the file
I/O functions.
- There are a few more transformations of some of the API I'd like to do to
better match Go style; I have some gathered in the TODO list at
https://github.com/martine/gocairo/blob/master/notes.org . More
suggestions are welcome. For an example bikeshed, which is better:
  AddColorStopRGBA(offset float64, r, g, b a float64)
  AddColorStopRGBA(offset, r, g, b a float64)
?

[1] https://godoc.org/github.com/ungerik/go-cairo
[2] https://godoc.org/github.com/Joker/go-cairo
[3] https://godoc.org/github.com/conformal/gotk3/cairo

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Hǎiliàng at Jun 9, 2015 at 8:46 am
    You might not have found https://github.com/hailiang/cwrap, which has done
    pretty much the same thing.

    BTW, what tool did you use to parse C headers?

    Hǎiliàng
    On Tuesday, June 9, 2015 at 1:13:55 AM UTC+8, Evan Martin wrote:

    Hello,

    I'd like to announce Golang bindings for the Cairo graphics library:
    https://godoc.org/github.com/martine/gocairo/cairo

    There are other projects which aim to do the same thing [1], [2], [3].
    However, all are incomplete -- compare the lengths of the relevant godoc
    links -- and some appear abandoned.

    I aimed to make this one complete and regular by taking an alternative
    approach: I parse the C header to gather all the functions and types and
    then generate the wrapper (in an idiomatic Go style) from there.

    Caveats:
    - I've written some example programs at
    https://github.com/martine/gocairo/tree/master/example but I haven't
    verified all the API works as expected.
    - This implementation is still missing some of the advanced Cairo
    functions such as text glyph/cluster management, raster sources, and some
    of the file I/O functions.
    - There are a few more transformations of some of the API I'd like to do
    to better match Go style; I have some gathered in the TODO list at
    https://github.com/martine/gocairo/blob/master/notes.org . More
    suggestions are welcome. For an example bikeshed, which is better:
    AddColorStopRGBA(offset float64, r, g, b a float64)
    AddColorStopRGBA(offset, r, g, b a float64)
    ?

    [1] https://godoc.org/github.com/ungerik/go-cairo
    [2] https://godoc.org/github.com/Joker/go-cairo
    [3] https://godoc.org/github.com/conformal/gotk3/cairo
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 8, '15 at 5:13p
activeJun 9, '15 at 8:46a
posts2
users2
websitegolang.org

2 users in discussion

Evan Martin: 1 post Hǎiliàng: 1 post

People

Translate

site design / logo © 2022 Grokbase