Code Monkey home page Code Monkey logo

svg-barcode-datamatrix's Introduction

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 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.

METHODS

plot

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

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

PARAMETERS

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

dotsize

$value      = $datamatrix->dotsize;
$datamatrix = $datamatrix->dotsize($newvalue);
$datamatrix = $datamatrix->dotsize('');          # 1

Getter 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('');          # AUTO

Getter 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('');          # 0

Getter 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('');          # AUTO

Getter 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, Barcode::DataMatrix.

svg-barcode-datamatrix's People

Contributors

tekki avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.