Project-Gantt

 view release on metacpan or  search on metacpan

Gantt.pm  view on Meta::CPAN

=item infoStroke

B<infoStroke> is the stroke color for the informational boxes. This defaults to black.

=item containerStroke

B<containerStroke> is the stroke color for sub-projects on the chart. This defaults to black.

=item containerFill

B<containerFill> is the fill color for sub-project items. This defaults to grey (as defined by B<Image::Magick>).

=item itemFill

B<itemFill> is the fill color for task items on the chart. This defaults to blue. Note that there is no stroke color for tasks (it is set to the fill).

=item background

B<background> is quite obviously the background color. This defaults to white.

=item font

B<font> is the name of the font file as it is passed to B<Image::Magick>. See the docs for that module for more information. The default value for this property is determined by searching @INC for the directory of your Project::Gantt installation, an...

=item doTitle

B<doTitle> is a boolean that determines whether the title of the chart is drawn on it.

=item doSwimLanes

B<doSwimLanes> is a boolean that determines whether lines should be drawn seperating each time interval from the header to the end of the graph. This makes it easy to see the exact values.

=back

Gantt.pm  view on Meta::CPAN

Alexander Christian Westholm, E<lt>awestholm AT verizon.netE<gt>

=head1 CHANGES

August, 2004: Original Version

January 2005: Modifications made by Peter Weatherdon (peter.weatherdon AT us.cd-adapco.com), including various bug fixes, and nested sub-projects.

=head1 SEE ALSO

L<Image::Magick>, L<Class::Date>

=head1 COPYRIGHT

Copyright 2005, Alexander Christian Westholm.

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

=cut
 

Gantt/Gantt/ImageWriter.pm  view on Meta::CPAN

#		chart to the screen.
#
#	Client:	CPAN
#
#	CVS: $Id: ImageWriter.pm,v 1.14 2004/08/03 17:56:52 awestholm Exp $
#
##########################################################################
package Project::Gantt::ImageWriter;
use strict;
use warnings;
use Image::Magick;
use Project::Gantt::DateUtils qw[:round :lookup];
use Project::Gantt::Globals;
use Project::Gantt::GanttHeader;
use Project::Gantt::TimeSpan;
use Project::Gantt::SpanInfo;

##########################################################################
#
#	Method:	new(%opts)
#

Gantt/Gantt/ImageWriter.pm  view on Meta::CPAN

	my ($height, $width) = (0,0);
	$height = 40;
	# add height for each row
	$height += 20 for (1..$me->{root}->getNodeCount());
	$width	= 205;
	my $incr = $DAYSIZE;
	$incr = $MONTHSIZE if($me->{mode} eq 'months');
	# add width for each time unit
	$width += $incr for (1..$me->{root}->timeSpan());

	my $canvas = new Image::Magick(size=>"${width}x$height");
	$canvas->Read('xc:'.$me->{skin}->background());
	$me->{canvas} = $canvas;
}

##########################################################################
#
#	Method:	display(filename)
#
#	Purpose: Creates the Calendar header and draws it, then calls
#		writeBars to draw in all tasks/subprojects. Finally,

Gantt/Gantt/TimeSpan.pm  view on Meta::CPAN

use warnings;
use Project::Gantt::Globals;

##########################################################################
#
#	Method:	new(%opts)
#
#	Purpose: Constructor. Takes as parameters the Task or Gantt object
#		it is going to display, as well as the Class::Date object
#		representing the beginning of the chart. In addition, the
#		Image::Magick canvas is passed in, along with a skin object
#		to customize the colors of this TimeSpan.
#
##########################################################################
sub new {
	my $cls	= shift;
	my %ops	= @_;
	die "Must provide proper args to TimeSpan!" if(not($ops{task} and $ops{rootStr}));
	return bless {
		task	=>	$ops{task},
		rootStr	=>	$ops{rootStr},

Gantt/Gantt/TimeSpan.pm  view on Meta::CPAN

	my $secsInSpan	= ($death - $birth)->sec;
	my $percentage	= $secsInSpan / $secsInYear;
	return $percentage * $pixelsPerYr;
}

##########################################################################
#
#	Method:	_drawTask(startX, startY, endX, range)
#
#	Purpose: Given the starting coordinates, and ending X coordinate
#		of a TimeSpan, uses Image::Magick to draw the span on the
#		chart using whatever Skin scheme is in effect. Range is
#		an indication of whether the span takes up more than
#		15 pixels or not. If so, the span is drawn as a diamond,
#		if not, as a rectangle.
#
##########################################################################
sub _drawTask {
	my $me		= shift;
	my $startX	= shift;
	my $startY	= shift;

Makefile.PL  view on Meta::CPAN

use 5.008;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME'		=> 'Project::Gantt',
    'VERSION_FROM'	=> 'Gantt.pm', # finds $VERSION
    'PREREQ_PM'		=> {
	Image::Magick	=>	'6.0.1',
	Class::Date	=>	'1.1.7',
	}, # e.g., Module::Name => 1.1
    ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
      (ABSTRACT_FROM => 'Gantt.pm', # retrieve abstract from module
       AUTHOR     => 'Alexander Christian Westholm <awestholm@verizon.net>') : ()),
);

README  view on Meta::CPAN

To install this module type the following:

   perl Makefile.PL
   make
   make install

DEPENDENCIES

This module requires these other modules and libraries:

  Image::Magick version 6.0.1 or greater.

COPYRIGHT AND LICENCE

Put the correct copyright and licence information here.

Copyright (C) 2004 Alexander Christian Westholm

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



( run in 0.974 second using v1.01-cache-2.11-cpan-beeb90c9504 )