From 47d48aa0ebf359b8cf326e43a4494fa17e42c997 Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Wed, 12 May 2010 19:48:28 +0000 Subject: [PATCH] stylistic changes. M Ruler.pm git-svn-id: svn+ssh://svn.sgn.cornell.edu/cxgn/Cview/trunk@18234 b4ddb4e3-33f1-0310-aa89-e703427ae9b8 --- lib/CXGN/Cview/Ruler.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/CXGN/Cview/Ruler.pm b/lib/CXGN/Cview/Ruler.pm index bbce310..3ecc520 100644 --- a/lib/CXGN/Cview/Ruler.pm +++ b/lib/CXGN/Cview/Ruler.pm @@ -27,11 +27,12 @@ Lukas Mueller (lam87@cornell.edu) 1; use strict; + use CXGN::Cview::ImageObject; package CXGN::Cview::Ruler; -use base qw( CXGN::Cview::ImageObject ); +use base "CXGN::Cview::ImageObject"; =head2 function new() @@ -47,13 +48,12 @@ use base qw( CXGN::Cview::ImageObject ); sub new { my $class = shift; - my $args ={}; my $self = $class -> SUPER::new(@_); my $x = shift; my $y = shift; $self ->{height} = shift; - $self ->{start_value} = shift; - $self ->{end_value} = shift; + $self ->set_start_value(shift); + $self ->set_end_value(shift); $self -> {font} = GD::Font->Small(); $self -> set_color (50, 50, 50); $self -> {label_side} = "left"; @@ -127,7 +127,7 @@ sub get_units { return $self->{unit}; } -=head2 function get_start_value() +=head2 function get_start_value(), set_start_value() Synopsis: accessor for the start_value property Arguments: @@ -253,7 +253,7 @@ sub render { } } } - my $label = "[".$self->{unit}."]"; + my $label = "[".$self->get_units()."]"; $image -> string($self->{font}, $self->get_horizontal_offset()-$self->{font}->width()*length($label)/2, $self->get_vertical_offset()-$self->{font}->height()-3, $label, $color); } -- 2.11.4.GIT