Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tekki/svg-barcode-datamatrix
Perl module to generate SVG based Data Matrix codes
https://github.com/tekki/svg-barcode-datamatrix
Last synced: 24 days ago
JSON representation
Perl module to generate SVG based Data Matrix codes
- Host: GitHub
- URL: https://github.com/tekki/svg-barcode-datamatrix
- Owner: Tekki
- Created: 2019-05-26T04:24:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-31T17:07:46.000Z (almost 5 years ago)
- Last Synced: 2023-08-20T22:27:52.554Z (about 1 year ago)
- Language: Perl
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
SVG::Barcode::DataMatrix - Generator for SVG based Data Matrix barcodes
# SYNOPSIS
use SVG::Barcode::DataMatrix;
my $datamatrix = SVG::Barcode::DataMatrix->new;
my $svg = $datamatrix->plot('https://perldoc.pl');$datamatrix->dotsize; # 1
$datamatrix->encoding_mode; # AUTO
$datamatrix->process_tilde; # 0
$datamatrix->size; # AUTO
# from SVG::Barcode:
$datamatrix->foreground; # black
$datamatrix->background; # white
$datamatrix->margin; # 2
$datamatrix->id;
$datamatrix->class;
$datamatrix->width;
$datamatrix->height;
$datamatrix->scale;my %params = (
level => 'H',
margin => 4,
);
$datamatrix = SVG::Barcode::DataMatrix->new(%params);# use as function
use SVG::Barcode::DataMatrix 'plot_datamatrix';$svg = plot_datamatrix('https://perldoc.pl', %params);
# DESCRIPTION
[SVG::Barcode::DataMatrix](https://metacpan.org/pod/SVG%3A%3ABarcode%3A%3ADataMatrix) is a generator for SVG based Data Matrix barcodes.
# FUNCTIONS
## plot\_datamatrix
use SVG::Barcode::DataMatrix 'plot_datamatrix';
$svg = plot_datamatrix($text, %params);
Returns a Data Matrix using the provided text and parameters.
# CONSTRUCTOR
## new
$datamatrix = SVG::Barcode::DataMatrix->new; # create with defaults
$datamatrix = SVG::Barcode::DataMatrix->new(%params);Creates a new Data Matrix plotter. Inherited from [SVG::Barcode](https://metacpan.org/pod/SVG%3A%3ABarcode#new).
# METHODS
## plot
$svg = $datamatrix->plot($text);
Creates a SVG code. Inherited from [SVG::Barcode](https://metacpan.org/pod/SVG%3A%3ABarcode#plot).
# PARAMETERS
Inherited from [SVG::Barcode](https://metacpan.org/pod/SVG%3A%3ABarcode):
[background](https://metacpan.org/pod/SVG%3A%3ABarcode#background),
[class](https://metacpan.org/pod/SVG%3A%3ABarcode#class),
[foreground](https://metacpan.org/pod/SVG%3A%3ABarcode#foreground),
[height](https://metacpan.org/pod/SVG%3A%3ABarcode#height),
[id](https://metacpan.org/pod/SVG%3A%3ABarcode#id),
[margin](https://metacpan.org/pod/SVG%3A%3ABarcode#margin),
[scale](https://metacpan.org/pod/SVG%3A%3ABarcode#scale),
[width](https://metacpan.org/pod/SVG%3A%3ABarcode#width).## dotsize
$value = $datamatrix->dotsize;
$datamatrix = $datamatrix->dotsize($newvalue);
$datamatrix = $datamatrix->dotsize(''); # 1Getter and setter for the size of the dots. Default `1`.
## encoding\_mode
$value = $datamatrix->encoding_mode;
$datamatrix = $datamatrix->encoding_mode($newvalue);
$datamatrix = $datamatrix->encoding_mode(''); # AUTOGetter and setter for the encoding mode.
One of `AUTO`, `ASCII`, `C40`, `TEXT`, `BASE256`, or `NONE`. Default `AUTO`.## process\_tilde
$value = $datamatrix->process_tilde;
$datamatrix = $datamatrix->process_tilde($newvalue);
$datamatrix = $datamatrix->process_tilde(''); # 0Getter and setter for the tilde flag.
If set to `1` the tilde character `~` is being used to recognize special characters.
Default `0`.## size
$value = $datamatrix->size;
$datamatrix = $datamatrix->size($newvalue);
$datamatrix = $datamatrix->size(''); # AUTOGetter and setter for the module size of the matrix. `height x width`, one of `AUTO`, `10x10`,
`12x12`, `14x14`, `16x16`, `18x18`, `20x20`, `22x22`, `24x24`, `26x26`, `32x32`, `36x36`,
`40x40`, `44x44`, `48x48`, `52x52`, `64x64`, `72x72`, `80x80`, `88x88`, `96x96`,
`104x104`, `120x120`, `132x132`, `144x144`, `8x18`, `8x32`, `12x26`, `12x36`, `16x36`,
`16x48`. Default `AUTO`.# 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](https://metacpan.org/pod/SVG%3A%3ABarcode), [Barcode::DataMatrix](https://metacpan.org/pod/Barcode%3A%3ADataMatrix).