2011-03-16 26 views
0

因此,对于初学者来说,我通过扩展:http://www.helloandroid.com/tutorials/how-use-canvas-your-android-apps-part-1来学习画布。什么原因导致使用函数在Android画布上产生差异?

我计算过,我想让我的程序运行的东西,每次它运行,所以我决定增加一个功能,在运行功能进行跑,所以它看起来像:

public void run() { 

Canvas c; 

while (_run) { 

displayHumanHand(); 

c = null; 

try { 

        c = _surfaceHolder.lockCanvas(null); 
        synchronized (_surfaceHolder) { 

         onDraw(c); 
        } 
       } finally { 
        if (c != null) { 
         _surfaceHolder.unlockCanvasAndPost(c); 
        } 
       } 
      } 
     } 

随着displayhumanhand只是有一系列“卡片”并以数字排列它们,并且不应该影响正在使用的位图(现在)。

enter image description here

为什么:但是,加入这行代码导致质量差的变化呢?是什么导致质量下降?我怎样才能解决这个问题? 此外,当我绘制相同的图标时(为了第一个imgur链接),为什么右侧的图像与左侧的图像不同?

回答

相关问题