摘要:
背景 今天在博问中看到一个问题:用canvas 的 lineto方法画对角线,但画出来的图形不对? 这是一个很常见的误区,这里给大家细说一下。原理 在w3网站上是这样解释的:Thecanvaselement has two attributes to control the size of the coordinate space:widthandheight. These attributes, when specified, must have values that arevalid non-negative integers.Therules for parsing non-ne... 阅读全文