HTML canvas data 属性HTML5 Canvas 参考手册定义和用法data 属性返回一个对象,该对象包含指定的 ImageData 对象的图像数据。对于 ImageData 对象中的每个像素,都存在着四方
HTML canvas height 属性HTML5 Canvas 参考手册定义和用法height 属性返回 ImageData 对象的高度,以像素计。提示:请参阅 createImageData()、getImageData() 以及 putImageDa
HTML canvas width 属性HTML5 Canvas 参考手册定义和用法width 属性返回 ImageData 对象的宽度,以像素计。提示:请参阅 createImageData()、getImageData() 以及 putImageData
HTML canvas drawImage() 方法HTML5 Canvas 参考手册定义和用法drawImage() 方法在画布上绘制图像、画布或视频。drawImage() 方法也能够绘制图像的某些部分,以及/或者增加或
HTML canvas measureText() 方法HTML5 Canvas 参考手册定义和用法measureText() 方法返回包含一个对象,该对象包含以像素计的指定字体宽度。提示:如果您需要在文本向画布输出
HTML canvas strokeText() 方法HTML5 Canvas 参考手册定义和用法strokeText() 方法在画布上绘制文本(没有填色)。文本的默认颜色是黑色。提示:请使用 font 属性来定义字体和字
HTML canvas fillText() 方法HTML5 Canvas 参考手册定义和用法fillText() 方法在画布上绘制填色的文本。文本的默认颜色是黑色。提示:请使用 font 属性来定义字体和字号,并使
HTML canvas textBaseline 属性HTML5 Canvas 参考手册定义和用法textBaseline 属性设置或返回在绘制文本时的当前文本基线。下面的图示演示了 textBaseline 属性支持的各种
HTML canvas textAlign 属性HTML5 Canvas 参考手册定义和用法textAlign 属性根据锚点,设置或返回文本内容的当前对齐方式。通常,文本会从指定位置开始,不过,如果您设置为 textAl
HTML canvas font 属性HTML5 Canvas 参考手册定义和用法font 属性设置或返回画布上文本内容的当前字体属性。font 属性使用的语法与 CSS font 属性相同。实例在画布上写一段
HTML canvas setTransform() 方法HTML5 Canvas 参考手册定义和用法画布上的每个对象都拥有一个当前的变换矩阵。setTransform() 方法把当前的变换矩阵重置为单位矩阵,然后以
HTML canvas transform() 方法HTML5 Canvas 参考手册定义和用法画布上的每个对象都拥有一个当前的变换矩阵。transform() 方法替换当前的变换矩阵。它以下面描述的矩阵来操
HTML canvas translate() 方法HTML5 Canvas 参考手册定义和用法translate() 方法重新映射画布上的 (0,0) 位置。注释:当您在 translate() 之后调用诸如 fillRect() 之类的方
HTML canvas rotate() 方法HTML5 Canvas 参考手册定义和用法rotate() 方法旋转当前的绘图。实例将矩形旋转 20 度: Your browser does not support the HTML5 canvas tag. v
HTML canvas scale() 方法HTML5 Canvas 参考手册定义和用法scale() 方法缩放当前绘图,更大或更小。注释:如果您对绘图进行缩放,所有之后的绘图也会被缩放。定位也会被缩放。如