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)
package org.gskbyte.splineTest.background; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.view.MotionEvent; import android.view.View; public class BackgroundView extends View { protected Bitmap mBg; protected int mBgWidth, mBgHeight; protected int mCanvasWidth, mCanvasHeight; protected final Paint mPaint = new Paint(); protected final Rect mOrgRect = new Rect(), mDstRect = new Rect(); private int mLastX, mLastY; protected void init(Bitmap bitmap) { if(bitmap!=null) { mBg = bitmap; mBgWidth = mBg.getWidth(); mBgHeight = mBg.getHeight(); } } protected BackgroundView(Context context) { super(context); mBg = null; mBgWidth = 0; mBgHeight = 0; mCanvasWidth = 0; mCanvasHeight = 0; } public BackgroundView(Context context, int iconId) { super(context); init( BitmapFactory.decodeResource(context.getResources(), iconId) ); } public BackgroundView(Context context, Bitmap bitmap) { super(context); init(bitmap); } public void recycle() { mBg.recycle(); } public void setCanvasSize(int width, int height) { mCanvasWidth = width; mCanvasHeight = height; mOrgRect.left = 0; mOrgRect.top = 0; if(mBgWidth>width){ mOrgRect.right = width; mDstRect.left = 0; mDstRect.right = width; } else { mOrgRect.right = mBgWidth; mDstRect.left = (width-mBgWidth)/2; mDstRect.right = mDstRect.left+mBgWidth; } if(mBgHeight>height){ mOrgRect.bottom = height; mDstRect.top = 0; mDstRect.bottom = height; } else { mOrgRect.bottom = mBgHeight; mDstRect.top = (height-mBgHeight)/2; mDstRect.bottom = mDstRect.top+mBgHeight; } } public void onDraw(Canvas canvas) { if(mCanvasHeight != canvas.getHeight()) setCanvasSize(canvas.getWidth(), canvas.getHeight()); canvas.drawBitmap(mBg, mOrgRect, mDstRect, mPaint); } public boolean onTouchEvent(MotionEvent event) { int x = (int) event.getX(); int y = (int) event.getY(); int action = event.getAction(); switch(action){ case MotionEvent.ACTION_DOWN: mLastX = x; mLastY = y; break; case MotionEvent.ACTION_MOVE: mOrgRect.left += (mLastX-x); if(mOrgRect.left<0) mOrgRect.left=0; else if (mOrgRect.left>mBgWidth-mCanvasWidth) mOrgRect.left=mBgWidth-mCanvasWidth; mOrgRect.right = mOrgRect.left + mCanvasWidth; mOrgRect.top += (mLastY-y); if(mOrgRect.top<0) mOrgRect.top=0; else if (mOrgRect.top>mBgHeight-mCanvasHeight) mOrgRect.top=mBgHeight-mCanvasHeight; mOrgRect.bottom = mOrgRect.top + mCanvasHeight; mLastX = x; mLastY = y; invalidate(); break; } return true; } }