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")
}
In order to use this module, native Cairo
library is needed. See instructions at https://cairographics.org/download/.
doc/screenshot/arc-negative.png
doc/screenshot/curve-rectangle.png
doc/screenshot/fill-and-stroke.png
doc/screenshot/image-pattern.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