Code example for ColorMatrix

Methods: set

0
		paintGray.setAlpha(0);
		 
		//src = new Float[]{0,480}; 
		UpMatrix = new Matrix();
		DownMatrix = new Matrix();
		colormatrix = new ColorMatrix();
		colormatrix.set(new float[] {
                1, 0, 0, 0, 0, 
                0, 1, 0, 0, 0, 
                0, 0, 1, 0, 0, 
                0, 0, 0, 1, 0 }); 
		 
		//paint.setColorFilter(new ColorMatrixColorFilter(colormatrix)); 
		 
		gradientShadow = new int[]{0xFF000000,0xFF000000};
		gradientdrawable = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, gradientShadow);
		gradientdrawable.setGradientType(GradientDrawable.LINEAR_GRADIENT);
		 
		 
		//ÉèÖþØÐÎpath,·Ö¸ôͼƬÓà
		path = new Path();