摘要: 这两天在看html5的canvas,实现了上面那个东西需要注意的地方:1.canvas的sava()和restore()理解和使用2.canvas的translate scale rotate ..的使用,每个变化都应该清楚圆心和角度..看:http://blog.sina.com.cn/s/blog_8fab526c01015tqs.html3.自定义旋转transform方法,实现数字的fillTextView Code <!DOCTYPE html><html><head> <meta http-equiv="Content-Type& 阅读全文
posted @ 2013-05-11 21:00 GM_Lv 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 今天写了个canvas的热点图测试,发觉画笔的点和鼠标的位置不一致,有挺大的偏差。开始还以为是jq中位置函数引用错误,offset和pageX...那几个的属性再看了遍,发觉没什么问题。后来google了下,发觉是html5的canvas问题,这是一个很常见的误区!!在w3网站上是这样解释的:Thecanvaselement has two attributes to control the size of the coordinate space:widthandheight. These attributes, when specified, must have values tha... 阅读全文
posted @ 2013-05-11 15:42 GM_Lv 阅读(349) 评论(0) 推荐(0) 编辑