Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
import java.util.Random; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.PointF; import android.graphics.Rect; import android.os.Bundle; import android.util.Log; import android.view.Surface; import android.view.View; public class DrawingTestActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(new DrawingTestView(getApplication())); } private static class DrawingTestView extends View { protected final int WIDTH = 320; protected final int HEIGHT = 240; protected final int NBALLS = 2; protected final float MAXBALLSIZE = 20.0f; protected PointF mBallPositions[]; protected float mBallSizes[]; protected Bitmap mBitmap; protected int[] mPixels; protected Random mRnd = new Random(); public DrawingTestView(Context c) { super(c); mBitmap = Bitmap.createBitmap(WIDTH, HEIGHT, false); mPixels = new int[WIDTH * HEIGHT]; mBallPositions = new PointF[NBALLS]; mBallSizes = new float[NBALLS]; for (int i = 0; i < NBALLS; i++) { mBallPositions[i] = new PointF( mRnd.nextFloat() * WIDTH, mRnd.nextFloat()* HEIGHT ); mBallSizes[i] = mRnd.nextFloat() * MAXBALLSIZE; } } @Override protected void onDraw(Canvas canvas) { long sTime, uTime, cTime; sTime = System.currentTimeMillis(); // Update pixel buffer for (int x = 0; x < WIDTH; x++) { for(int y = 0; y < HEIGHT; y++) { float fs = 0; for(int n = 0; n < NBALLS; n++) { fs += mBallSizes[n] / ((mBallPositions[n].x - x) * (mBallPositions[n].x - x)) + ((mBallPositions[n].y - y) * (mBallPositions[n].y - y)); } int color = (fs > 0.5) ? 255 : 0; mPixels[x + (y * WIDTH)] = color; } } uTime = System.currentTimeMillis() - sTime; // Draw pixel buffer mBitmap.setPixels(mPixels, 0, WIDTH, 0, 0, WIDTH, HEIGHT); // Draw to canvas canvas.drawBitmap(mBitmap, 0, 0, null); cTime = System.currentTimeMillis() - sTime; // Invalidate for next redraw invalidate(0, 0, WIDTH, HEIGHT); Log.v("onDraw timing", "Frame:\tUT: " + uTime +"ms.\tCT:" + cTime + "ms."); } } }