package
0.0.0-20160323153452-958a0a0266f1
Repository: https://github.com/archs/js.git
Documentation: pkg.go.dev
# Functions
New creates a Canvas instance el is the html element.
# Constants
source-in 新图形会仅仅出现与原有内容重叠的部分。其它区域都变成透明的。.
copy 只有新图形会被保留,其它都被清除掉。.
darker 两图形中重叠的部分作减色处理。.
destination-atop 原有内容中与新内容重叠的部分会被保留,并会在原有内容之下绘制新图形.
destination-in 原有内容中与新图形重叠的部分会被保留,其它区域都变成透明的。.
destination-out 原有内容中与新图形不重叠的部分会被保留。.
destination-over 会在原有内容之下绘制新图形。.
lighter 两图形中重叠部分作加色处理。.
source-atop 新图形中与原有内容重叠的部分会被绘制,并覆盖于原有内容之上。.
source-out 结果是只有新图形中与原有内容不重叠的部分会被绘制出来。.
source-over (default) 这是默认设置,新图形会覆盖在原有内容之上。.
xor 重叠的部分会变成透明。.
(neither).
(both directions),.
(horizontal only),.
(vertical only), or.
# Structs
canvas元素也可以通过应用CSS的方式来增加边框,设置内边距、外边距等, 而且一些CSS属性还可以被canvas内的元素继承。 比如字体样式,在canvas内添加的文字,其样式默认同canvas元素本身是一样的。
canvas是行内元素.
在canvas中为context设置属性同样要遵从CSS语法.
No description provided by the author
No description provided by the author
The CanvasPattern interface represents an opaque object describing a pattern, based on a image, a canvas or a video, created by the CanvasRenderingContext2D.createPattern() method.