NAME
Graph::Drawing - Base class for graph drawing functionality
SYNOPSIS
#use Graph::Drawing::ForceDirected; # Not implemented.
#use Graph::Drawing::SimulatedAnnealing; # Not implemented.
#use Graph::Drawing::Magnetic; # Not implemented.
#use Graph::Drawing::Heirarchical; # Not implemented.
#use Graph::Drawing::Orthogonal; # Not implemented.
use Graph::Drawing::Random;
$g = Graph::Drawing::Random->new(%args);
$g->surface->write_image;
DESCRIPTION
This module is a base class from which the Graph::Drawing
subclasses derive common functionality.
This module is a subclass of Graph::Weighted
, which in turn is a subclass of Graph::Directed
. Thus, every appropriate method available in those modules, is also available to a Graph::Drawing
object.
Please see the Graph::Drawing::*
subclass SYNOPSIS
sections for usage descriptions.
Please see the distribution eg/ directory for a working, if only feeble, example.
ABSTRACT
Base class for graph drawing functionality.
PUBLIC METHODS
- new_surface %ARGUMENTS
-
Create and return a new surface object.
- name $STRING
-
The file name (without the extension like ".png") to use when saving the image. This attribute is prepended to the
format
attribute to make the image filename. - format $STRING
-
The graphic file format to use when saving. Currently, this is only the
PNG
format.This object attribute is appended (automatically) to the
name
attribute, as the "file extension", to make the image filename. - type $MODULE
-
Specify the graphics module to use. Currently, this is only
GD
. (Imager
is next!) - surface_size $PIXELS
-
The size of the (square) surface, in pixels.
- grade $PIXELS
-
The gradation interval.
- surface
-
Accessor to the
Graph::Drawing::Surface
object. - new_vertex %ARGUMENTS
-
Create and return a new vertex object.
- vertex $NAME
-
Return the
Graph::Drawing::Vertex
object, given the vertex name.
PRIVATE METHODS
- _debug
-
This method is inherited from the parent class,
Graph::Weighted
and like all the other methods there, can be called directly, on aGraph::Drawing
object.
SEE ALSO
TO DO
A little less than everything.
If you would like to contribute to this project, please contact me and I will rejoice.
AUTHOR
Gene Boggs <gene@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2003 by Gene Boggs
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.