English 中文(简体)
Anders - on the signcaling than prescaling, wtf?
原标题:Android - on the fly scaling faster than prescaling, wtf?

我正试图策划我的第一场乐赛,其中含有带有滚动式物体的转播器,上面有一张图。

I decode the png:

moon=BitmapFactory.decodeResource(resources, R.drawable.moon);

然后,就每个巴标而言,我从一开始就这样做(其规模可能不同):

scaledMoon=Bitmap.createScaledBitmap(game.moon, (int)(r*2), (int)(r*2), true);

我在引用《公报》时这样做:

c.drawBitmap(scaledMoon,x,y, null);

我用100个物体来做到这一点,几乎总是有22个物体。

但是,当我这样做的时候(不要在!)

c.drawBitmap(game.moon, new Rect(0,0,game.moon.getWidth(),game.moon.getHeight()), new Rect((int)(x-r),(int)(y-r),(int)(x+r),(int)(y+r)), null);

我拿着17条之子......

仅举一个圈子

c.drawCircle(x, y, r, color);

我拿着24门。

www.un.org/Depts/DGACM/index_spanish.htm ......?

问题回答

你的第3行使最快的是,你改用同样的轨道图,而不是用你事先尝试过的所有轨道图填上录像记忆;它没有做新的地图,而是为你想要获得的东西打上了界限。 至于24个绘画圈子,我最有道理的是,计算和提取点需要更长的时间,然后是简单的试样。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签