# blue-canvas-tmpl

> blue-canvas-tmpl

Latest version **1.0.7** (published 2020-04-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install blue-canvas-tmpl
pnpm add blue-canvas-tmpl
yarn add blue-canvas-tmpl
bun add blue-canvas-tmpl
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2020-04-03 |
| First published | 2019-04-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 139.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Blue |
| Maintainers | blue_fu |

## Links

- npm: https://www.npmjs.com/package/blue-canvas-tmpl
- Repository: https://github.com/Azhanging/blue-canvas-tmpl
- Homepage: https://github.com/Azhanging/blue-canvas-tmpl#readme
- Issues: https://github.com/Azhanging/blue-canvas-tmpl
- npm.io page: https://npm.io/package/blue-canvas-tmpl

## Dependencies (1)

- [blue-queue-pipe](https://npm.io/package/blue-queue-pipe.md) ^1.1.1

## Recent versions

- 1.0.7 (latest) — 2020-04-03
- 1.0.6 — 2020-04-02
- 1.0.5 — 2019-04-17
- 1.0.4 — 2019-04-16
- 1.0.3 — 2019-04-11
- 1.0.2 — 2019-04-11
- 1.0.1 — 2019-04-11
- 1.0.0 — 2019-04-11

## README

# blue-canvas-tmpl
canvas template

### 使用
```typescript
interface BlueCanvasTmplOpts {
    //canvas宽度
    width?: number;
    //canvas高度
    height?: number;
    //创建 hook
    created?: Function;
    //完全绘制完成后钩子
    rendered?: Function;
    //canvas的element id
    el?: string;
    //渲染列表
    renderList?: (Function | {
        //图片和文字类型
        type: 'image' | 'text';
        //相对canvas的x坐标
        x: number;
        //相对canvas的y坐标
        y: number;
        //字体
        font?: string;
        //字体样式
        style?: string;
        //绘制前钩子
        created?: Function;
        //绘制后钩子
        rendered?: Function;
    })[];
}
declare class BlueCanvasTmpl {
    private options;
    private loadQueue;
    private canvasCtx;
    private canvas;
    private id;
    constructor(opts?: {});
    renderText(text: any): void;
    resetCanvasProperties(): void;
    update(options?: BlueCanvasTmplOpts): void;
    arc(): void;
    getByteLength(): any;
    static getByteLength(): any;
}
```

---
_Source: https://npm.io/package/blue-canvas-tmpl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
