https://github.com/timo/cairo-p6
A NativeCall binding to the Cairo 2d graphics library for Perl 6
https://github.com/timo/cairo-p6
Last synced: about 1 year ago
JSON representation
A NativeCall binding to the Cairo 2d graphics library for Perl 6
- Host: GitHub
- URL: https://github.com/timo/cairo-p6
- Owner: timo
- Created: 2014-05-24T21:18:13.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-06-11T19:43:05.000Z (about 2 years ago)
- Last Synced: 2024-10-11T20:55:11.419Z (over 1 year ago)
- Language: Raku
- Homepage:
- Size: 614 KB
- Stars: 10
- Watchers: 4
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Cairo 2D Graphics library binding for Raku
==========================================
Synopsis
--------
```raku
use Cairo;
given Cairo::Image.create(Cairo::FORMAT_ARGB32, 128, 128) {
given Cairo::Context.new($_) {
.rgb(0, 0.7, 0.9);
.rectangle(10, 10, 50, 50);
.fill :preserve; .rgb(1, 1, 1);
.stroke
};
.write_png("foobar.png")
}
```
Native Cairo library
--------------
In order to use this module, native `Cairo` library is needed. See instructions at https://cairographics.org/download/.
### Examples
doc/screenshot/arc-negative.png

doc/screenshot/arc.png

doc/screenshot/clip-image.png

doc/screenshot/clip.png

doc/screenshot/curve-rectangle.png

doc/screenshot/curve_to.png

doc/screenshot/dash.png

doc/screenshot/fill-and-stroke.png

doc/screenshot/fill-style.png

doc/screenshot/gradient.png

doc/screenshot/image-pattern.png

doc/screenshot/image.png

doc/screenshot/multi-page-pdf.pdf

doc/screenshot/multi-segment-caps.png

doc/screenshot/rounded-rectangle.png

doc/screenshot/set-line-cap.png

doc/screenshot/set-line-join.png

doc/screenshot/svg-surface.svg

doc/screenshot/text-align-center.png

doc/screenshot/text-extents.png

doc/screenshot/text.png
