1#############################################################################
2# (c) by Tels 2004. Part of Graph::Easy. An anonymous (invisible) node.
3#
4#############################################################################
5
6package Graph::Easy::Node::Anon;
7
8use Graph::Easy::Node;
9
10@ISA = qw/Graph::Easy::Node/;
11$VERSION = '0.76';
12
13use strict;
14use warnings;
15
16sub _init
17  {
18  my $self = shift;
19
20  $self->SUPER::_init(@_);
21
22  $self->{name} = '#' . $self->{id};
23  $self->{class} = 'node.anon';
24
25  $self->{att}->{label} = ' ';
26
27  $self;
28  }
29
30sub _correct_size
31  {
32  my $self = shift;
33
34  $self->{w} = 3;
35  $self->{h} = 3;
36
37  $self;
38  }
39
40sub attributes_as_txt
41  {
42  my $self = shift;
43
44  $self->SUPER::attributes_as_txt( {
45     node => {
46       label => undef,
47       shape => undef,
48       class => undef,
49       } } );
50  }
51
52sub as_pure_txt
53  {
54  '[ ]';
55  }
56
57sub _as_part_txt
58  {
59  '[ ]';
60  }
61
62sub as_txt
63  {
64  my $self = shift;
65
66  '[ ]' . $self->attributes_as_txt();
67  }
68
69sub text_styles_as_css
70  {
71  '';
72  }
73
74sub is_anon
75  {
76  # is an anon node
77  1;
78  }
79
801;
81__END__
82
83=head1 NAME
84
85Graph::Easy::Node::Anon - An anonymous, invisible node in Graph::Easy
86
87=head1 SYNOPSIS
88
89	use Graph::Easy::Node::Anon;
90
91	my $anon = Graph::Easy::Node::Anon->new();
92
93=head1 DESCRIPTION
94
95A C<Graph::Easy::Node::Anon> represents an anonymous, invisible node.
96These can be used to let edges start and end "nowhere".
97
98The syntax in the Graph::Easy textual description language looks like this:
99
100	[ ] -> [ Bonn ] -> [ ]
101
102=head1 EXPORT
103
104None by default.
105
106=head1 SEE ALSO
107
108L<Graph::Easy::Node>.
109
110=head1 AUTHOR
111
112Copyright (C) 2004 - 2006 by Tels L<http://bloodgate.com>.
113
114See the LICENSE file for more details.
115
116=cut
117