strokeStyle

描边样式,默认是#000.它的值可以是颜色值(color),渐变对象(gradient),纹理填充对象(pattern).

  ctx.strokeStyle = '#225588';

color

颜色值1 strokeStyle = 'RGB(64,128,192)'

颜色值2 strokeStyle = 'RGBA(64,128,192,.6)'

颜色值3 strokeStyle = 'HSL(360,50%,50%)'

颜色值4 strokeStyle = 'HSL(360,50%,50%,.6)'

颜色值5 HEX strokeStyle = '#225588'

gradient

线性渐变

放射渐变

pattern

图片填充