Changeset 30250 for trunk/tools/czartool/Plotter.pm
- Timestamp:
- Jan 12, 2011, 2:52:40 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/czartool/Plotter.pm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czartool/Plotter.pm
r29951 r30250 7 7 8 8 use File::Temp; 9 10 use czartool::Config; 9 11 10 12 my @allStages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); … … 18 20 my $class = shift; 19 21 my $self = { 20 _gpc1Db => shift, 21 _czarDb => shift, 22 _config => shift, 22 23 _dateFormat => shift, 23 24 _outputFormat => shift, … … 27 28 28 29 bless $self, $class; 30 $self->init(); 29 31 return $self; 30 32 } … … 38 40 my $class = shift; 39 41 my $self = { 40 _gpc1Db => shift, 41 _czarDb => shift, 42 _config => shift, 42 43 _outputPath => shift, 43 44 _save_temps => shift, 44 45 }; 45 46 46 $self->{_dateFormat} = "%Y%m%d-%H%M%S"; 47 $self->{_outputFormat} = "png font \"/usr/share/fonts/corefonts/arial.ttf\" 8"; # TODO path needs to be in config 48 49 bless $self, $class; 47 $self->{_outputFormat} = "png font \"".$self->{_config}->getGnuplotFont()."\" ".$self->{_config}->getGnuplotFontSize(); 48 49 bless $self, $class; 50 $self->init(); 50 51 return $self; 51 52 } … … 59 60 my $class = shift; 60 61 my $self = { 61 _gpc1Db => shift, 62 _czarDb => shift, 62 _config => shift, 63 63 _save_temps => shift, 64 64 }; … … 69 69 70 70 bless $self, $class; 71 $self->init(); 71 72 return $self; 72 73 } 73 74 74 75 ########################################################################### 76 # 77 # Some initialisation code common to all constructors 78 # 79 ########################################################################### 80 sub init { 81 my ($self) = @_; 82 83 $self->{_gpc1Db} = $self->{_config}->getGpc1Instance(); 84 $self->{_czarDb} = $self->{_config}->getCzarDbInstance(); 85 } 75 86 76 87 ###########################################################################
Note:
See TracChangeset
for help on using the changeset viewer.
