Code example for IntBuffer

Methods: clear

0
 
    public IntBuffer copyPixelsToBuffer(IntBuffer buffer) {
        if (null == buffer)
            buffer = IntBuffer.allocate(bitmap.getHeight() * bitmap.getWidth());
        else 
            buffer.clear();
        bitmap.copyPixelsToBuffer(buffer);
        return buffer;
    } 
 
    public final class DrawThread extends Thread {
        private boolean mRun = true;
        private boolean mPause = false;
 
        @Override 
        public void run() { 
            waitForBitmap(); 
 
            final SurfaceHolder surfaceHolder = getHolder();
            Canvas canvas = null;