1
0
Fork
You've already forked svg-barcode
0
Perl base class for SVG 1D and 2D codes
  • Perl 100%
Find a file
Rolf Stöckli 0a970190b3 Released version 0.12
- Pod reorganized
 - Code reformatted
2020年01月31日 17:26:26 +01:00
.project Add test config. 2019年07月14日 14:57:05 +02:00
lib/SVG Released version 0.12 2020年01月31日 17:26:26 +01:00
t Reformat code, reorganize pod. 2020年01月31日 17:06:57 +01:00
.gitignore Add code. 2019年05月22日 10:59:43 +02:00
.perltidyrc Reformat code, reorganize pod. 2020年01月31日 17:06:57 +01:00
Changes Released version 0.12 2020年01月31日 17:26:26 +01:00
cpanfile Change parameters to methods, add svg attributes. 2019年05月26日 06:17:03 +02:00
Makefile.PL Released version 0.12 2020年01月31日 17:26:26 +01:00
MANIFEST.SKIP Add .project to MANIFEST.SKIP. 2019年07月13日 08:22:23 +02:00
README.md Released version 0.12 2020年01月31日 17:26:26 +01:00

NAME

SVG::Barcode - Base class for SVG 1D and 2D codes

SYNOPSIS

use SVG::Barcode::Subclass;
my $plotter = SVG::Barcode::Subclass->new;
my $svg = $plotter->plot($text);
$plotter->foreground; # black
$plotter->background; # white
$plotter->margin; # 2
$plotter->id;
$plotter->class;
$plotter->width;
$plotter->height;
$plotter->scale;
%params = (
 foreground => 'red',
 id => 'barcode',
);
$plotter = SVG::Barcode::Subclass->new(%params);

DESCRIPTION

SVG::Barcode is a base class for SVG 1D and 2D codes.

You will not use it directly, it will be loaded by its subclasses:

CONSTRUCTOR

new

$plotter = SVG::Barcode::Subclass->new; # create with defaults
$plotter = SVG::Barcode::Subclass->new(%params);

METHODS

plot

$svg = $plotter->plot($text);

Creates a barcode.

PARAMETERS

background

$value = $plotter->background;
$plotter = $plotter->background($newvalue);
$plotter = $plotter->background(''); # white

Getter and setter for the background color. Default white.

class

$value = $plotter->class;
$plotter = $plotter->class($newvalue);
$plotter = $plotter->class(''); # ''

Getter and setter for the class of the svg element. Default ''.

foreground

$value = $plotter->foreground;
$plotter = $plotter->foreground($newvalue);
$plotter = $plotter->foreground(''); # black

Getter and setter for the foreground color. Default black.

height

$value = $plotter->height;
$plotter = $plotter->height($newvalue);
$plotter = $plotter->height(''); # ''

Getter and setter for the height of the svg element. Default ''.

id

$value = $plotter->id;
$plotter = $plotter->id($newvalue);
$plotter = $plotter->id(''); # ''

Getter and setter for the id of the svg element. Default ''.

margin

$value = $plotter->margin;
$plotter = $plotter->margin($newvalue);
$plotter = $plotter->margin(''); # 2

Getter and setter for the margin around the barcode. Default 2.

scale

$value = $plotter->scale;
$plotter = $plotter->scale($newvalue);
$plotter = $plotter->scale(''); # ''

Getter and setter for the scale of the svg element. Sets "width" and "height" to products of the width and height of the graphics. Used to display small barcodes without blur. Default ''.

width

$value = $plotter->width;
$plotter = $plotter->width($newvalue);
$plotter = $plotter->width(''); # ''

Getter and setter for the width of the svg element. Default ''.

AUTHOR & COPYRIGHT

© 2019–2020 by Tekki (Rolf Stöckli).

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

SEE ALSO

SVG::Barcode::Code128, SVG::Barcode::DataMatrix, SVG::Barcode::QRCode.