paint.setStyle(Style.FILL);

解决方案 »

  1.   


    这样的话,文字和背景就混在一起了,看不到字了!
    你的意思是drawText和背景用的同一个paint?
    那drawText可以用单独的paint
    paint默认style就是FILL
      

  2.   

    没有遇到过这种情况 上个截图看看多设置一些 paint 属性, 颜色 大小 宽度 啥的, 
      

  3.   

    刚刚回复你,我就找到解决办法了。   
                    c.beginPath();
                    c.fillStyle = "purple";
                    c.font = "bold 30px Gautami";
                    c.clearRect(w / 2 - 20, 0, mc.width, 30);
                    c.fillText("00:" + miaonum + ":" + num, w / 2 - 20, 29);
                    c.closePath();而错误的是:  
      c.beginPath();
                    c.strokeStyle = "purple";
                    c.font = "bold 30px Gautami";
                    c.clearRect(w / 2 - 20, 0, mc.width, 30);
                    c.strokeText("00:" + miaonum + ":" + num, w / 2 - 20, 29);
                    c.closePath();
                    c.stroke();