dot-image
TypeScript icon, indicating that this package has built-in type declarations

0.0.20 • Public • Published

Dot Image

live demo 可以从本地上传图片,查看效果

介绍

将一个图片转换为点图

安装

npm i dot-image

Props

  • src 图片地址
  • color 图片颜色 默认原始图片的像素颜色
  • fontWeight 像素大小
  • direction 控制绘制的方向 默认为纵向

使用说明

  • main.ts
import { DotImage } from 'dot-image'
app.component('DotImage', DotImage)
  • vue script
import img from '../public/3.png'
  • vue template
<DotImage :src="img" color="red" font-weight="5" w-20 ma ></DotImage>
  • JS
const dotImage1 = new DotImageCanvas(kb, '', 3, 'transparent')
dotImage1.append('.dotImage')
  • html
<span class="dotImage" />

Readme

Keywords

Package Sidebar

Install

npm i dot-image

Weekly Downloads

4

Version

0.0.20

License

MIT

Unpacked Size

11.1 kB

Total Files

5

Last publish

Collaborators

  • simon_he