File: Small.pm

package info (click to toggle)
libgraphviz-perl 2.24-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 952 kB
  • sloc: perl: 2,174; makefile: 8
file content (58 lines) | stat: -rw-r--r-- 1,048 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package GraphViz::Small;

use strict;
use warnings;
use GraphViz;

our @ISA = qw(GraphViz);

our $VERSION = '2.24';

=head1 NAME

GraphViz::Small - subclass of GraphViz with small nodes

=head1 SYNOPSIS

  use GraphViz::Small;

  my $g = GraphViz::Small->new();
  # methods as for GraphViz

=head1 DESCRIPTION

Graphs produced by GraphViz are occasionally huge, making it hard to
observe the structure. This subclass simply makes the nodes small and
empty, allowing the structure to stand out.

=head1 METHODS

As for GraphViz.

=cut

sub add_node_munge {
    my $self = shift;
    my $node = shift;

    $node->{label}  = '';
    $node->{height} = 0.2;
    $node->{width}  = 0.2;
    $node->{style}  = 'filled';
    $node->{color}  = 'black' unless $node->{color};
}

=head1 AUTHOR

Leon Brocard E<lt>F<acme@astray.com>E<gt>

=head1 COPYRIGHT

Copyright (C) 2000-1, Leon Brocard

This module is free software; you can redistribute it or modify it under the Perl License,
a copy of which is available at L<http://dev.perl.org/licenses/>.

=cut

1;