README

Cairo 2D Graphics library binding for Raku

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

image iall_cairo_doc_screenshot_arc_negative_png not found

doc/screenshot/arc.png

image iall_cairo_doc_screenshot_arc_png not found

doc/screenshot/clip-image.png

image iall_cairo_doc_screenshot_clip_image_png not found

doc/screenshot/clip.png

image iall_cairo_doc_screenshot_clip_png not found

doc/screenshot/curve-rectangle.png

image iall_cairo_doc_screenshot_curve_rectangle_png not found

doc/screenshot/curve_to.png

image iall_cairo_doc_screenshot_curve_to_png not found

doc/screenshot/dash.png

image iall_cairo_doc_screenshot_dash_png not found

doc/screenshot/fill-and-stroke.png

image iall_cairo_doc_screenshot_fill_and_stroke_png not found

doc/screenshot/fill-style.png

image iall_cairo_doc_screenshot_fill_style_png not found

doc/screenshot/gradient.png

image iall_cairo_doc_screenshot_gradient_png not found

doc/screenshot/image-pattern.png

image iall_cairo_doc_screenshot_image_pattern_png not found

doc/screenshot/image.png

image iall_cairo_doc_screenshot_image_png not found

doc/screenshot/multi-page-pdf.pdf

image iall_cairo_doc_screenshot_multi_page_pdf_pdf not found

doc/screenshot/multi-segment-caps.png

image iall_cairo_doc_screenshot_multi_segment_caps_png not found

doc/screenshot/rounded-rectangle.png

image iall_cairo_doc_screenshot_rounded_rectangle_png not found

doc/screenshot/set-line-cap.png

image iall_cairo_doc_screenshot_set_line_cap_png not found

doc/screenshot/set-line-join.png

image iall_cairo_doc_screenshot_set_line_join_png not found

doc/screenshot/svg-surface.svg

image iall_cairo_doc_screenshot_svg_surface_svg not found

doc/screenshot/text-align-center.png

image iall_cairo_doc_screenshot_text_align_center_png not found

doc/screenshot/text-extents.png

image iall_cairo_doc_screenshot_text_extents_png not found

doc/screenshot/text.png

image iall_cairo_doc_screenshot_text_png not found

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.