摘要: View Code <!doctype html><html><head><meta charset="utf-8" /><style>body { margin:0; overflow:hidden;}</style><script src="js/jquery-1.7.1.min.js"></script><script>onload = function() { //获取面板对象 var canvas = document.getElemen 阅读全文
posted @ 2012-06-08 19:31 时生 阅读(398) 评论(0) 推荐(0) 编辑
摘要: context . restore() //弹出堆最上面保存的绘图状态context . save() //在绘图状态堆上保存当前绘图状态绘图状态可以看作当前画面应用的所有样式和变形的一个快照。而状态的应用则可以避免绘图代码的过度膨胀。转换(Transformations)context . rotate(angle) //按给定的弧度旋转,按顺时针旋转context . scale(x, y) //按给定的缩放倍率缩放,1.0,为不变context . setTransform(m11, m12, m21, m22, dx, dy)//重设当前的转换到context . transform( 阅读全文
posted @ 2012-06-08 15:15 时生 阅读(5973) 评论(0) 推荐(0) 编辑