Coder Social home page Coder Social logo

abdulgafur24 / datamatrix-svg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datalog/datamatrix-svg

0.0 1.0 0.0 21 KB

Data Matrix generator is for fast creation of rectangular or square 2D codes. Written on vanilla javascript with no dependencies.

License: MIT License

JavaScript 100.00%

datamatrix-svg's Introduction

SVG Data Matrix Generator

Data Matrix svg generator LICENSE

Data Matrix generator written on pure javascript. Produces highly optimized SVG nodes.

Data Matrix svg generator (Live demo)

Easy to start

After datamatrix.min.js is downloaded and connected to your html5 page, call:

var
svgNode = DATAMatrix('Hello World!');

All other options:

var
svgNode = DATAMatrix({

     msg :  "Your message here"
    ,dim :   256
    ,rct :   0
    ,pad :   2
    ,pal : ["#000000", "#f2f4f8"]
    ,vrb :   0

});

Options

  • msg - Data Matrix message, obviously, this is mandatory parameter.
  • rct - set 1 to render rectangle Data Matrix if possible, default value is 0.
  • dim - is equal to needed dimention (height) in pixels, default value is 256.
  • pad - white space padding, default value is 2 blocks, set 0 for no padding.
  • pal - is array of [color,background-color] strings that represent hex color codes, default value is ['#000'] along with transparent background. Set ['#000','#fff'] to make background opaque.
  • vrb - svg node is optimized to be compact and default value is 0, set this parameter to 1 in case you need more verbose output.

datamatrix-svg's People

Contributors

datalog avatar

Watchers

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.