A NativeCall binding to the Cairo 2d graphics library for Perl 6
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8e01481 Nov 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc path fix Nov 6, 2018
lib add basic Font class and Font::FreeType intgration Oct 22, 2017
t more forgiving tests on toy fonts Sep 30, 2017
.gitignore CCAutoTag push : update screenshot Oct 13, 2018
.travis.yml no longer use panda in travis file May 24, 2017
META6.json add basic Font class and Font::FreeType intgration Oct 22, 2017
Readme.md CCAutoTag push : space Oct 13, 2018

Readme.md

Cairo 2D Graphics library binding for Perl 6

Synopsis

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 arc-negative.png

doc/screenshot/arc.png arc.png

doc/screenshot/clip-image.png clip-image.png

doc/screenshot/clip.png clip.png

doc/screenshot/curve-rectangle.png curve-rectangle.png

doc/screenshot/curve_to.png curve_to.png

doc/screenshot/dash.png dash.png

doc/screenshot/fill-and-stroke.png fill-and-stroke.png

doc/screenshot/fill-style.png fill-style.png

doc/screenshot/gradient.png gradient.png

doc/screenshot/image-pattern.png image-pattern.png

doc/screenshot/image.png image.png

doc/screenshot/multi-page-pdf.pdf multi-page-pdf.pdf

doc/screenshot/multi-segment-caps.png multi-segment-caps.png

doc/screenshot/rounded-rectangle.png rounded-rectangle.png

doc/screenshot/set-line-cap.png set-line-cap.png

doc/screenshot/set-line-join.png set-line-join.png

doc/screenshot/svg-surface.svg svg-surface.svg

doc/screenshot/text-align-center.png text-align-center.png

doc/screenshot/text-extents.png text-extents.png

doc/screenshot/text.png text.png