dotpic
Doc picture generator
Last updated a year ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install dotpic 
SYNC missed versions from official npm registry.

dotpic

Build Status Code Climate Code Coverage npm Version JS Standard

Doc picture generator

Installation

$ npm install dotpic --save

Usage

'use strict'

const dotpic = require('dotpic')
const fs = require('fs')

// Write dot picture
let src = `
000011110000
000001100000
000001100000
000001100000
100001100001
111111111111
111111111111
100001100001
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000011110000
`

let svg = dotpic(src, {
  colors: {
    '0': '#444',
    '1': '#FFF'
  }
})

fs.writeFile('my-svg.svg', svg)

Signature

dotpic(src, options) -> string

Params

Name Type Description
src string image data
options Object Optional settings
options.colors Object Color data
options.width number Image width
options.height number Image height
options.background string Background color

License

This software is released under the MIT License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (13)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |