/[Frey]/trunk/lib/Frey/Class/Graph.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Class/Graph.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1155 by dpavlin, Tue Jun 30 19:47:10 2009 UTC revision 1156 by dpavlin, Thu Jul 2 14:00:02 2009 UTC
# Line 100  has produce_dot => ( Line 100  has produce_dot => (
100          isa => 'Bool',          isa => 'Bool',
101  );  );
102    
103    has clusters => (
104            documentation => 'cluster by classes',
105            is => 'rw',
106            isa => 'Bool',
107    );
108    
109  sub introspect_path { 'var/introspect/' };  sub introspect_path { 'var/introspect/' };
110    
111  sub as_markup {  sub as_markup {
# Line 213  sub as_markup { Line 219  sub as_markup {
219                  my $pcnt = $v / $max_count;                  my $pcnt = $v / $max_count;
220                  my $color = join(",", ( $pcnt, $pcnt, 0.75 ) );                  my $color = join(",", ( $pcnt, $pcnt, 0.75 ) );
221    
222                    my @cluster;
223                    if ( $self->clusters ) {
224                            my $name = $1 if $node =~ m{^([^:]+)};
225                            @cluster = ( 'cluster' => {
226                                    name => $name,
227                                    style => 'filled',
228                                    bgcolor => 'lightgrey',
229                                    color => 'lightgrey',
230                            });
231                    }
232    
233                  $g->add_node( $node,                  $g->add_node( $node,
234                          style =>'filled',                          style =>'filled',
235                          color => $color,                          color => $color,
236                          fillcolor => $color,                          fillcolor => $color,
237  #                       label => "$node\n$v",  #                       label => "$node\n$v",
238                            @cluster,
239                  );                  );
240    
241          }          }

Legend:
Removed from v.1155  
changed lines
  Added in v.1156

  ViewVC Help
Powered by ViewVC 1.1.26