转自:http://www.cnblogs.com/artwl/archive/2012/02/28/2372042.html 作者:Artwl 背景 今天在博问中看到一个问题:用canvas 的 lineto方法画对角线,但画出来的图形不对? 这是一个很常见的误区,这里给大家细说一下. 原理 在w3网站上是这样解释的: The canvas element has two attributes to control the size of the coordinate space: width
基本数据类型 byte = -128和127------------------------------------------------------------2的8次方,1个字节 short = -32768和32767-------------------------------------------------------2的16次方,2个字节 int = -2147483648和2147483647--------------------------------