~ubuntu-branches/ubuntu/trusty/libchart-gnuplot-perl/trusty

« back to all changes in this revision

Viewing changes to lib/Chart/Gnuplot/Util.pm

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann, Ansgar Burchardt, Salvatore Bonaccorso, gregor herrmann
  • Date: 2011-09-17 18:17:44 UTC
  • mfrom: (1.2.4 upstream) (3.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110917181744-rx1p4pcav89anno1
Tags: 0.17-1
[ Ansgar Burchardt ]
* debian/control: Convert Vcs-* fields to Git.

[ Salvatore Bonaccorso ]
* debian/copyright: Replace DEP5 Format-Specification URL from
  svn.debian.org to anonscm.debian.org URL.

[ gregor herrmann ]
* New upstream release.
* Bump debhelper compatibility level to 8.
* Add /me to Uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
use Exporter;
5
5
 
6
6
@ISA = qw(Exporter);
7
 
@EXPORT_OK = qw(_lineType _pointType _copy);
 
7
@EXPORT_OK = qw(_lineType _pointType _borderCode _copy);
8
8
 
9
9
# Convert named line type to indexed line type of gnuplot
10
10
#
73
73
}
74
74
 
75
75
 
 
76
# Encode the border name
 
77
# - Used by setting graph border display
 
78
sub _borderCode
 
79
{
 
80
    my ($side) = @_;
 
81
    return($side) if ($side =~ /^\d+$/);
 
82
 
 
83
    my $code = 0;
 
84
    $code += 1 if ($side =~ /(^|,)\s*(1|bottom|bottom left front)\s*(,|$)/);
 
85
    $code += 2 if ($side =~ /(^|,)\s*(2|left|bottom left back)\s*(,|$)/);
 
86
    $code += 4 if ($side =~ /(^|,)\s*(4|top|bottom right front)\s*(,|$)/);
 
87
    $code += 8 if ($side =~ /(^|,)\s*(8|right|bottom right back)\s*(,|$)/);
 
88
    $code += 16 if ($side =~ /(^|,)\s*(16|left vertical)\s*(,|$)/);
 
89
    $code += 32 if ($side =~ /(^|,)\s*(32|back vertical)\s*(,|$)/);
 
90
    $code += 64 if ($side =~ /(^|,)\s*(64|right vertical)\s*(,|$)/);
 
91
    $code += 128 if ($side =~ /(^|,)\s*(128|front vertical)\s*(,|$)/);
 
92
    $code += 256 if ($side =~ /(^|,)\s*(256|top left back)\s*(,|$)/);
 
93
    $code += 512 if ($side =~ /(^|,)\s*(512|top right back)\s*(,|$)/);
 
94
    $code += 1024 if ($side =~ /(^|,)\s*(1024|top left front)\s*(,|$)/);
 
95
    $code += 2048 if ($side =~ /(^|,)\s*(2048|top right front)\s*(,|$)/);
 
96
    return($code);
 
97
}
 
98
 
 
99
 
76
100
# Copy object using dclone() of Storable
77
101
sub _copy
78
102
{