English 中文(简体)
移除甲状腺中的比照图
原标题:Removing bitmaps in android

你们如何去除甲状腺的比图? 我制作了一个叫做“sun”的比图,但一旦我完成了横跨屏幕的 walk行,我就希望添加一个称为“月球”的新比图,但只是从太阳顶上绘制,我如何去掉太阳光图? 这里是我的行道守则。

    switch (counter)
    {

    case 0:
        skyRect.set(0, 0, canvas.getWidth(), 400);
        canvas.drawRect(skyRect, sky);
        canvas.drawBitmap(AndroidDude, changingX, (canvas.getHeight()/2 - (AndroidDude.getHeight()/2)), null);
        if (changingX < canvas.getWidth())
        {
            changingX += 10;
        }
        else 
        {
            changingX = 0;
            sunChangingX = 0;
            counter++;
        }

        grassRect.set(0, 400, canvas.getWidth(), canvas.getHeight());
        canvas.drawRect(grassRect, grass);
        canvas.drawBitmap(cloud, 100, 50, null);
        canvas.drawBitmap(cloud, 700, 100, null);
        canvas.drawBitmap(sun, (canvas.getWidth() - sun.getWidth()), 0, null);
        invalidate();
        break;

    case 1:
        //Remove sun and clouds here?
        canvas.drawBitmap(moon, (canvas.getWidth() - moon.getWidth()), 0, null);
        canvas.drawBitmap(AndroidDude, changingX, (canvas.getHeight()/2 - (AndroidDude.getHeight()/2)), null);
        if (changingX < canvas.getWidth())
        {
            changingX += 10;
        }
        else 
        {
            changingX = 0;
            counter++;
        }
        grassRect.set(0, 400, canvas.getWidth(), canvas.getHeight());
        canvas.drawRect(grassRect, grass);
        canvas.drawBitmap(cloud, 100, 50, null);
        canvas.drawBitmap(cloud, 700, 100, null);
        canvas.drawBitmap(sun, sunChangingX, 0, null);
        invalidate();
        break;
    }
最佳回答

根据你想要清除的比图,重塑你的背景(天和草)。 履行复习职能。

问题回答

你只是从老事物中汲取新东西。 如果你需要“审案”,你只是重述背景。

Canvas.drawColor(Color.WHITE);

<>>>

You can have to clean canvas so you can draw rectangle with WHITE color.

页: 1

它将看上去是空洞的。

并再次引证你们的希望。

你的产出将以白色显示。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签