feat: 绘制Header和Legend
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { PAPER_SIZE } from './constant';
|
||||
|
||||
export function setCanvasSize(canvas: Canvas, paperSize: PaperSize) {
|
||||
const sizeObj = PAPER_SIZE[paperSize];
|
||||
// const { pixelRatio: dpr, windowWidth, windowHeight } = wx.getWindowInfo();
|
||||
// const printWidth = A4.width;
|
||||
// const printHeight = A4.height;
|
||||
// @ts-ignore
|
||||
// const originWidth = canvas._width || windowWidth;
|
||||
// // @ts-ignore
|
||||
// const originHeight = canvas._height || windowHeight;
|
||||
|
||||
canvas.width = sizeObj.width;
|
||||
canvas.height = sizeObj.height;
|
||||
console.log('canvas----:', canvas);
|
||||
return canvas;
|
||||
}
|
||||
Reference in New Issue
Block a user