Skip to content

hankache/perl6-Imlib2

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 18 commits ahead of mrhdias:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
src
 
 
t
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Raku Imlib2 Imlib2 Logo

Raku interface to the Imlib2 image library.

Operating System Build Status
Linux Build Status

Description

Raku binding for Imlib2, a featureful and efficient image manipulation library, which produces high quality, anti-aliased output.

Installation

Note that a recent version of Imlib2 library must be installed before installing this module.

To install with zef:

zef update
zef install Imlib2

Synopsis

WARNING: This module is Work in Progress, which means: this interface is not final. This will perhaps change in the future.

Below is a sample code:

use Imlib2;

my $im = Imlib2.new();
# Create a new raw image.
my $rawimage = $im.create_image(200, 200);
exit() unless $rawimage;

# Sets the current image Imlib2 will be using with its function calls.
$rawimage.context_set();

# Sets the color with which text, lines and rectangles are drawn when
# being rendered onto an image.
$im.context_set_color(
	red   => 255,
	green => 127,
	blue  => 0,
	alpha => 255);

$im.image_draw_rectangle(
	location => (0, 0),
	size     => (200, 200),
	fill     => True);
$im.image_set_format("png");
unlink("images/test_imlib2.png") if "images/test_imlib2.png".IO ~~ :e;
$im.save_image("images/test_imlib2.png");

# Frees the image that is set as the current image in Imlib2's context.
$im.free_image();

exit();

Author

Henrique Dias mrhdias@gmail.com

See Also

License

This library is free software; you can redistribute it and/or modify it under the same terms as Raku itself.

About

Raku interface to the Imlib2 image library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Raku 93.4%
  • C 5.9%
  • Makefile 0.7%