Chart
view release on metacpan or search on metacpan
lib/Chart/Lines.pm view on Meta::CPAN
$self->{'curr_y_max'} = $abs_y_max - 1;
# mark off the graph_border space
$self->{'curr_y_max'} -= 2 * $self->{'graph_border'};
#draw the bottom legend again
if ( $self->{'legend'} =~ /^bottom$/i )
{
$self->_draw_bottom_legend;
}
#draw the x label again
if ( $self->{'x_label'} )
{
$self->_draw_x_label;
}
#get back to the start point for the ticks
$self->{'curr_x_min'} = $self->{'temp_x_min'};
$self->{'curr_y_min'} = $self->{'temp_y_min'};
$self->{'curr_x_max'} = $self->{'temp_x_max'};
$self->{'curr_y_max'} = $self->{'temp_y_max'};
#draw the x ticks again
if ( $self->true( $self->{'xy_plot'} ) )
{
$self->_draw_x_number_ticks;
}
else
{
$self->_draw_x_ticks;
}
#reset the actual values
$self->{'curr_x_min'} = $t_x_min;
$self->{'curr_x_max'} = $t_x_max;
$self->{'curr_y_min'} = $t_y_min;
$self->{'curr_y_max'} = $t_y_max;
}
return;
}
## @fn private int _prepare_brush($color)
# set the gdBrush object to trick GD into drawing fat lines
#
sub _prepare_brush
{
my $self = shift;
my $color = shift;
my $radius = $self->{'brush_size'} / 2;
my ( @rgb, $brush, $white, $newcolor );
# get the rgb values for the desired color
@rgb = $self->{'gd_obj'}->rgb($color);
# create the new image
$brush = GD::Image->new( $radius * 2, $radius * 2 );
# get the colors, make the background transparent
$white = $brush->colorAllocate( 255, 255, 255 );
$newcolor = $brush->colorAllocate(@rgb);
$brush->transparent($white);
# draw the circle
$brush->arc( $radius - 1, $radius - 1, $radius, $radius, 0, 360, $newcolor );
# set the new image as the main object's brush
return $brush;
}
## be a good module and return 1
1;
( run in 2.078 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )