Bio-Phylo

 view release on metacpan or  search on metacpan

lib/Bio/Phylo/Forest/DrawNodeRole.pm  view on Meta::CPAN

 Function: Sets font_weight
 Returns : $self
 Args    : font_weight

=item set_font_color()

 Type    : Mutator
 Title   : set_font_color
 Usage   : $node->set_font_color($color);
 Function: Sets font_color
 Returns : font_color
 Args    : A color, which, depending on the underlying tree drawer, can either
           be expressed as a word ('red'), a hex code ('#00CC00') or an rgb
           statement ('rgb(0,255,0)')

=item set_text_horiz_offset()

 Type    : Mutator
 Title   : set_text_horiz_offset
 Usage   : $node->set_text_horiz_offset($text_horiz_offset);
 Function: Sets text_horiz_offset
 Returns : $self
 Args    : text_horiz_offset

=item set_text_vert_offset()

 Type    : Mutator
 Title   : set_text_vert_offset
 Usage   : $node->set_text_vert_offset($text_vert_offset);
 Function: Sets text_vert_offset
 Returns : $self
 Args    : text_vert_offset

=item set_rotation()

 Type    : Mutator
 Title   : set_rotation
 Usage   : $node->set_rotation($rotation);
 Function: Sets rotation
 Returns : $self
 Args    : rotation

=item set_clade_label()

 Type    : Mutator
 Title   : set_clade_label
 Usage   : $node->set_clade_label('Mammalia');
 Function: Sets a label for an entire clade to be visualized outside the tree
 Returns : $self
 Args    : string 

=item set_clade_label_font()

 Type    : Mutator
 Title   : set_clade_label_font
 Usage   : $node->set_clade_label_font({ '-face' => 'Verdana' });
 Function: Sets font properties for the clade label
 Returns : $self
 Args    : {
	'-face'   => 'Verdana', # Arial, Times, etc.
	'-weight' => 'bold',
	'-style'  => 'italic',
	'-colour' => 'red',
 }
 
=back

=head2 ACCESSORS

=over

=item get_collapsed()

 Type    : Mutator
 Title   : get_collapsed
 Usage   : something() if $node->get_collapsed();
 Function: Gets whether the node's descendants are shown as collapsed into a triangle
 Returns : true or false value
 Args    : NONE

=item get_first_daughter()

Gets invocant's first daughter.

 Type    : Accessor
 Title   : get_first_daughter
 Usage   : my $f_daughter = $node->get_first_daughter;
 Function: Retrieves a node's leftmost daughter.
 Returns : Bio::Phylo::Forest::Node
 Args    : NONE

=cut

    sub get_first_daughter {
        my $self = shift;
        if ( $self->get_collapsed ) {
            return;
        }
        else {
            return $self->SUPER::get_first_daughter;
        }
    }

=item get_last_daughter()

Gets invocant's last daughter.

 Type    : Accessor
 Title   : get_last_daughter
 Usage   : my $l_daughter = $node->get_last_daughter;
 Function: Retrieves a node's rightmost daughter.
 Returns : Bio::Phylo::Forest::Node
 Args    : NONE

=cut

    sub get_last_daughter {
        my $self = shift;
        if ( $self->get_collapsed ) {
            return;
        }



( run in 0.591 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )