[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Labels.pm [dev_week]
From: |
Mason James |
Subject: |
[Koha-cvs] koha/C4 Labels.pm [dev_week] |
Date: |
Fri, 06 Oct 2006 01:55:11 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Mason James <sushi> 06/10/06 01:55:11
Modified files:
C4 : Labels.pm
Log message:
perltidy.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.4.3&r2=1.3.4.4
Patches:
Index: Labels.pm
===================================================================
RCS file: /sources/koha/koha/C4/Labels.pm,v
retrieving revision 1.3.4.3
retrieving revision 1.3.4.4
diff -u -b -r1.3.4.3 -r1.3.4.4
--- Labels.pm 6 Oct 2006 01:51:47 -0000 1.3.4.3
+++ Labels.pm 6 Oct 2006 01:55:11 -0000 1.3.4.4
@@ -377,15 +377,16 @@
my ( $x_pos, $y_pos, $height, $width, $barcode, $barcodetype ) = @_;
$barcode = '123456789';
my $num_of_bars = length($barcode);
- my $bar_width = (($width / 10)*8); # %80 of lenght of label width
+ my $bar_width = ( ( $width / 10 ) * 8 ); # %80 of lenght of label width
my $tot_bar_length;
my $bar_length;
- my $guard_length =10;
+ my $guard_length = 10;
my $xsize_ratio;
if ( $barcodetype eq 'Code39' ) {
$bar_length = '14.4333333333333';
- $tot_bar_length = ( $bar_length * $num_of_bars ) + ( $guard_length *
2 );
+ $tot_bar_length =
+ ( $bar_length * $num_of_bars ) + ( $guard_length * 2 );
$xsize_ratio = ( $bar_width / $tot_bar_length );
eval {
PDF::Reuse::Barcode::Code39(
@@ -403,8 +404,9 @@
elsif ( $barcodetype eq 'COOP2of5' ) {
$bar_length = '9.43333333333333';
- $tot_bar_length = ( $bar_length * $num_of_bars ) + ( $guard_length *
2 );
- $xsize_ratio = ( $bar_width / $tot_bar_length )*.9;
+ $tot_bar_length =
+ ( $bar_length * $num_of_bars ) + ( $guard_length * 2 );
+ $xsize_ratio = ( $bar_width / $tot_bar_length ) * .9;
eval {
PDF::Reuse::Barcode::COOP2of5(
x => ( $x_pos + ( $width / 10 ) ),
@@ -419,12 +421,11 @@
}
}
-
-
- elsif( $barcodetype eq 'Industrial2of5' ) {
+ elsif ( $barcodetype eq 'Industrial2of5' ) {
$bar_length = '13.1333333333333';
- $tot_bar_length = ( $bar_length * $num_of_bars ) + ( $guard_length *
2 );
- $xsize_ratio = ( $bar_width / $tot_bar_length ) *.9;
+ $tot_bar_length =
+ ( $bar_length * $num_of_bars ) + ( $guard_length * 2 );
+ $xsize_ratio = ( $bar_width / $tot_bar_length ) * .9;
eval {
PDF::Reuse::Barcode::Industrial2of5(
x => ( $x_pos + ( $width / 10 ) ),
@@ -438,10 +439,11 @@
warn "$barcodetype, $barcode FAILED:$@";
}
}
-my $moo2 = $tot_bar_length * $xsize_ratio;
+ my $moo2 = $tot_bar_length * $xsize_ratio;
warn " $x_pos, $y_pos, $barcode, $barcodetype\n";
- warn "BAR_WDTH = $bar_width, TOT.BAR.LGHT=$tot_bar_length R*TOT.BAR
=$moo2 \n";
+ warn
+"BAR_WDTH = $bar_width, TOT.BAR.LGHT=$tot_bar_length R*TOT.BAR =$moo2 \n";
}
=item build_circ_barcode;
@@ -791,7 +793,8 @@
#'
sub drawbox {
my ( $llx, $lly, $urx, $ury ) = @_;
-# warn "llx,y= $llx,$lly , urx,y=$urx,$ury \n";
+
+ # warn "llx,y= $llx,$lly , urx,y=$urx,$ury \n";
my $str = "q\n"; # save the graphic state
$str .= "0.5 w\n"; # border color red