15 合成 context . globalAlpha [ = value ] 返回应用到呈现操作中的当前Alpha值。 可以设置它以改变Alpha值。超出0.0到1.0范围的的值会被忽略掉。 context . globalCompositeOperation [ = value ] 从下面的列表返回当前的合成操作。 可以设置它以改变合成操作。未知的值会被忽略掉。 All drawing operations are affected by the global compositing attributes, globalAlpha and globalCompositeOperation. The globalAlpha attribute gives an alpha value that is applied to shapes and images before they are
18 最佳实践 这一章是非标准的 When a canvas is interactive, authors should include focusable elements in the element's fallback content corresponding to each focusable part of the canvas. To indicate which focusable part of the canvas is currently focused, authors should use the drawFocusIfNeeded() method, passing it the element for which an outline is being drawn. This method only draws the focus outline if t
17 Drawing model When a shape or image is painted, user agents must follow these steps, in the order given (or act as if they do): Render the shape or image onto an infinite transparent black bitmap, creating image A, as described in the previous sections. For shapes, the current fill, stroke, and line styles must be honored, and the stroke must itself also be subjected to the current transformati
16 Shadows 所有的绘图操作都受四个全局阴影元素属性的影响: context . shadowColor [ = value ] Returns the current shadow color. Can be set, to change the shadow color. Values that cannot be parsed as CSS colors are ignored. context . shadowOffsetX [ = value ] context . shadowOffsetY [ = value ] Returns the current shadow offset. Can be set, to change the shadow offset. Values that are not finite numbers are ignored. conte
摘要 本规范文档为HTML的canvas元素定义了2D上下文。2D上下文提供了对象、方法和属性,用来绘制并操纵canvas绘图表面上的图形。 本文档的状态 This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/. This is the specification for the 2D
References All references are normative unless marked "Non-normative". [BEZIER] Courbes à poles, P. de Casteljau. INPI, 1959. [CSS] Cascading Style Sheets Level 2 Revision 1 (URL: http://www.w3.org/TR/CSS/), B. Bos, T. Çelik, I. Hickson, H. Lie. W3C. [CSSCOLOR] CSS Color Module Level 3 (URL: http://www.w3.org/TR/css3-color/), T. Çelik, C. Lilley, L. Baron. 7 June 2011. W3C Recommendation. [CSSFONT