Code example for Matrix

Methods: getValues

0
	static private final float[] transformValues_ = new float[9];
	 
	static boolean isDragging(final Canvas canvas)
	{ 
		canvas.getMatrix(canvasTransform_);
		canvasTransform_.getValues(transformValues_);
		return (transformValues_[Matrix.MSCALE_X] != 1.0);
	} // isDragging 
	 
	static boolean drawRoundRect(final Canvas canvas, 
							  final Rect rect, 
							  final float cornerRadius, 
							  final Paint brush)
	{ 
		if(isDragging(canvas))
			return false; 
 
		canvas.drawRoundRect(new RectF(rect), cornerRadius, cornerRadius, brush);
		return true; 
	} // drawRoundRect