jsPDF Canvas 插件 该插件模拟了 HTML5 Canvas 的功能
目标是提供一种方式,让当前的 canvas 用户能够直接打印成 PDF。
- Source:
Classes
Members
(inner) height
- Source:
width 属性是一个正整数,反映
这是两个控制画布大小的属性之一,另一个是 height。
(inner) width
- Source:
height 属性是一个正整数,反映
这是两个控制画布大小的属性之一,另一个是 width。
Methods
(inner) getContext(contextType, contextAttributes)
- Source:
getContext() 方法返回画布上的绘图上下文,如果上下文标识符不受支持,则返回 null。
参数:
Name | Type | Description |
---|---|---|
contextType |
string | 是一个包含上下文标识符的字符串,定义与画布关联的绘图上下文。可能的值是 "2d",这将创建一个表示二维渲染上下文的 Context2D 对象。 |
contextAttributes |
object |
(inner) toDataURL()
- Source:
toDataURL() 方法只是一个占位符,用于在意外调用时抛出错误。