July 2019 Archives

Draw a hexagon and fill it with color using Imager

Draw a hexagon and fill it with color using Imager

Source code.

use strict;
use warnings;

use Imager;
use Imager::Color;
use Imager::Fill;

my $xsize = 500;
my $ysize = 250;

my $img = Imager->new(xsize => $xsize, ysize => $ysize, channels => 4);

# Background white
$img->box(color => Imager::Color->new(255, 255, 255), xm…

Draw sin curve using Imager

Write sin curve using Imager.

Chart::GGPlot author say to me "It is hard to use graphic basic library for me".

so I want to illustrate basic drawing.

Cairo seems to be good as features but portability is not good.

so I try to plot sin curve by Imager.

Curve is continue of very short lines.

I wrote a graph of sin.

Performance is very fast. Generation of graph is in a second.

="bo…

About Yuki Kimoto

user-pic I'm Perl Programmer. I LOVE Perl. I want to contribute Perl community and Perl users.