NAME

SVG::Barcode::UPCE

VERSION

version 0.9

SYNOPSIS

use SVG::Barcode::UPCE;

my $upce = SVG::Barcode::UPCE->new;
my $svg     = $upce->plot('012345678905');

$upce->linewidth;     # 1
$upce->lineheight;    # 50
$upce->textsize;      # 10
                         # from SVG::Barcode:
$upce->foreground;    # black
$upce->background;    # white
$upce->margin;        # 2
$upce->id;
$upce->class;
$upce->width;
$upce->height;
$upce->scale;

my %params = (
  lineheight => 40,
  textsize   => 0,
);
$upce = SVG::Barcode::UPCE->new(%params);

# use as function
use SVG::Barcode::UPCE 'plot_upce';

my $svg = plot_upce('012345678905', %params);

DESCRIPTION

SVG::Barcode::UPCE is a generator for SVG based UPCE barcodes.

NAME

SVG::Barcode::UPCE - Generator for SVG based UPCE barcodes

FUNCTIONS

plot_upce

use SVG::Barcode::UPCE 'plot_upce';

$svg = plot_upce($text, %params);

Returns a UPCE barcode using the provided text and parameters.

CONSTRUCTOR

new

$upce = SVG::Barcode::UPCE->new;             # create with defaults
$upce = SVG::Barcode::UPCE->new(\%params);

Creates a new UPCE plotter. Inherited from SVG::Barcode.

METHODS

plot

Creates a SVG code. Inherited from SVG::Barcode.

PARAMETERS

Inherited from SVG::Barcode: background, class, foreground, height, id, margin, scale, width.

lineheight

$value   = $upce->lineheight;
$upce = $upce->lineheight($newvalue);
$upce = $upce->lineheight('');          # 30

Getter and setter for the height of a line. Default 30.

linewidth

$value   = $upce->linewidth;
$upce = $upce->linewidth($newvalue);
$upce = $upce->linewidth('');          # 1

Getter and setter for the width of a single line. Default 1.

textsize

$value   = $upce->textsize;
$upce = $upce->textsize($newvalue);
$upce = $upce->textsize('');          # 10

Getter and setter for the size of the text a the bottom. 0 hides the text. Default 10.

AUTHOR & COPYRIGHT

Derived from SVG::Barcode::Code128 © 2019–2020 by Tekki (Rolf Stöckli).

© 2025 by bwarden (Brett T. Warden).

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, GD::Barcode::UPCE.

AUTHOR

bwarden

COPYRIGHT AND LICENSE

This software is Copyright (c) 2025 by bwarden@cpan.org.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)