Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ungerik/go-cairo
Go binding for the cairo graphics library
https://github.com/ungerik/go-cairo
Last synced: 4 days ago
JSON representation
Go binding for the cairo graphics library
- Host: GitHub
- URL: https://github.com/ungerik/go-cairo
- Owner: ungerik
- License: other
- Created: 2012-08-22T18:27:01.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-03-04T07:57:41.000Z (10 months ago)
- Last Synced: 2024-10-25T05:22:46.608Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 88.9 KB
- Stars: 145
- Watchers: 7
- Forks: 33
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - go-cairo - Go binding for the cairo graphics library. (Images / Search and Analytic Databases)
- awesome-go - go-cairo - Go binding for the cairo graphics library - ★ 79 (Images)
- awesome-go-extra - go-cairo - 08-22T18:27:01Z|2022-08-15T09:39:14Z| (Images / Advanced Console UIs)
- awesome-go-zh - go-cairo
README
## go-cairo
### Go binding for the cairo graphics library
Based on Dethe Elza's version https://bitbucket.org/dethe/gocairo
but significantly extended and updated.Go specific extensions:
* NewSurfaceFromImage(image.Image)
* Surface.GetData() []byte
* Surface.SetData([]byte)
* Surface.GetImage() image.Image
* Surface.SetImage(image.Image)go-cairo also sports a sub package extimage with image.Image/draw.Image
implementations for 32 bit ARGB and 24 bit RGB color models.Overview:
* http://go.pkgdoc.org/github.com/ungerik/go-cairo
* http://go.pkgdoc.org/github.com/ungerik/go-cairo/extimageMissing features
* TextCluster
* FontExtents
* FontFace
* FontOptions
* ScaledFont
* Glyph### Installation:
Install cairo:
For Debian and Debian derivatives including Ubuntu:
sudo apt-get install libcairo2-dev
For Fedora:
sudo yum install cairo-devel
For openSUSE:
zypper install cairo-devel
For Arch Linux: (also [gcc](https://archlinux.org/packages/core/x86_64/gcc/) and [pkgconf](https://archlinux.org/packages/core/x86_64/pkgconf/) are required)
sudo pacman -S cairoFor MacOS you may get errors finding cairo-pdf.h. To fix this run:
xcode-select --install
Install go-cairo and run go-cairo-example:go get github.com/ungerik/go-cairo
go install github.com/ungerik/go-cairo/go-cairo-example && go-cairo-exampleCopyrights: See LICENSE file
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ungerik/go-cairo/trend.png)](https://bitdeli.com/free "Bitdeli Badge")