Commit ad141dde authored by rockyl's avatar rockyl

init

parent 3a025bd5
......@@ -67,7 +67,9 @@ export interface RenderOptions {
*/
export async function toCanvas(data: ICData, options: RenderOptions = {}, callback?: (canvas: HTMLCanvasElement) => void): Promise<HTMLCanvasElement | string> {
const {type: exportType = 'png', quality = 0.7} = options
let {scale = window['devicePixelRatio'] || 1} = options
let {scale:dpiScale = 1} = options
const scale = (window['devicePixelRatio'] || 1) * dpiScale
let {nodes, width, height} = data
width *= scale
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment