Code example for Canvas

Methods: setMatrix

0
			m1.invert( m1 );
			float[] v2 = getMatrixValues( m1 );
 
			mInvertedMatrix.postTranslate( -v1[Matrix.MTRANS_X], -v1[Matrix.MTRANS_Y] );
			mInvertedMatrix.postScale( v2[Matrix.MSCALE_X], v2[Matrix.MSCALE_Y] );
			mCanvas.setMatrix( mInvertedMatrix );
 
			mCurrentScale = getScale();
 
			mPaint.setStrokeWidth( mBrushSize );
		} 
	} 
 
	/** 
	 * Gets the paint. 
	 *  
	 * @return the paint 
	 */ 
	public Paint getPaint() {
		return mPaint;
	}