Android Canvas的save()和restore()
先举个例子:
canves.save(); canves.rotate(10.86f); dog.draw(canves); canves.restore(); p.setColor(Color.BLUE); canves.drawRect(new Rect(10,10,24,45), p);
在上面的代码中,我希望让dog这个精灵转个角度,但不希望后面的长方型旋转,这时,可以用save()和restore()锁定旋转的区域,这样不会影响其它的绘图。
java简单解析docx、pptx、xlsx文档 http://fonter.iteye.com/blog/420319
Log4j在Java WebApp的配置 http://fonter.iteye.com/blog/418570
J2ME to android之学习笔记 http://fonter.iteye.com/blog/416112
安装Jar提示“jar文件无效”的另一个奇怪原因 http://fonter.iteye.com/blog/414188
J2ME代码认证证书的支持情况http://fonter.iteye.com/blog/413357
S40平台播放多媒体时内存优化http://fonter.iteye.com/blog/413022
SUN的J2ME源代码下载 http://fonter.iteye.com/blog/412094相关推荐
大地飞鸿 2020-11-12
星星有所不知 2020-10-12
jinxiutong 2020-07-26
MIKUScallion 2020-07-05
songfens 2020-07-05
songfens 2020-06-11
songfens 2020-06-08
northwindx 2020-05-31
northwindx 2020-05-31
northwindx 2020-05-27
northwindx 2020-05-25
MIKUScallion 2020-05-25
jinxiutong 2020-05-10
xdyangxiaoromg 2020-05-10
大地飞鸿 2020-05-06
northwindx 2020-04-25