<commit_before>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2004-2007 Adobe Systems Incorporated
//  All Rights Reserved.
//
//  NOTICE: Adobe permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////

package mx.filters
{
import flash.filters.BitmapFilter;
import flash.filters.ColorMatrixFilter;

/**
 *  The ColorMatrixFilter class lets you apply a 4 x 5 matrix transformation on the 
 *  RGBA color and alpha values of every pixel in the input image to produce a result 
 *  with a new set of RGBA color and alpha values. It allows saturation changes, hue 
 *  rotation, luminance to alpha, and various other effects. You can apply the filter 
 *  to any display object (that is, objects that inherit from the DisplayObject class), 
 *  such as MovieClip, SimpleButton, TextField, and Video objects, as well as to 
 *  BitmapData objects.
 * 
 *  @see flash.filters.ColorMatrixFilter
 * 
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
public class ColorMatrixFilter extends BaseFilter implements IBitmapFilter
{
	public function ColorMatrixFilter(matrix:Array = null)
	{
		if (matrix != null)
		{
			this.matrix = matrix;
		} 
	}
	
	//----------------------------------
    //  matrix
    //----------------------------------
	
	private var _matrix:Array =  [1,0,0,0,0,0,
								  1,0,0,0,0,0,
								  1,0,0,0,0,0,
								  1,0];
	
	/**
	 *  A comma delimited list of 20 doubles that comprise a 4x5 matrix applied to the 
	 *  rendered element.  The matrix is in row major order -- that is, the first five 
	 *  elements are multipled by the vector [srcR,srcG,srcB,srcA,1] to determine the 
	 *  output red value, the second five determine the output green value, etc.
	 * 
	 *  The value must either be an array or comma delimited string of 20 numbers. 
	 * 
	 *  @langversion 3.0
	 *  @playerversion Flash 10
	 *  @playerversion AIR 1.5
	 *  @productversion Flex 4
	 */
	public function get matrix():Object
	{
		return _matrix;
	}
	
	public function set matrix(value:Object):void
	{
		if (value != _matrix)
		{
			if (value is Array)
			{
				_matrix = value as Array;
			}
			else if (value is String)
			{
				_matrix = String(value).split(',');
			}
			
			notifyFilterChanged();
		}
	}
	
	public function clone():BitmapFilter
	{
		return new flash.filters.ColorMatrixFilter(_matrix);
	}
	
}
}
<commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2004-2007 Adobe Systems Incorporated
//  All Rights Reserved.
//
//  NOTICE: Adobe permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////

package spark.filters
{
import flash.filters.BitmapFilter;
import flash.filters.ColorMatrixFilter;
import mx.filters.BaseFilter;
import mx.filters.IBitmapFilter;
/**
 *  The ColorMatrixFilter class lets you apply a 4 x 5 matrix transformation on the 
 *  RGBA color and alpha values of every pixel in the input image to produce a result 
 *  with a new set of RGBA color and alpha values. It allows saturation changes, hue 
 *  rotation, luminance to alpha, and various other effects. You can apply the filter 
 *  to any display object (that is, objects that inherit from the DisplayObject class), 
 *  such as MovieClip, SimpleButton, TextField, and Video objects, as well as to 
 *  BitmapData objects.
 * 
 *  @see flash.filters.ColorMatrixFilter
 * 
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
public class ColorMatrixFilter extends BaseFilter implements IBitmapFilter
{
	public function ColorMatrixFilter(matrix:Array = null)
	{
		if (matrix != null)
		{
			this.matrix = matrix;
		} 
	}
	
	//----------------------------------
    //  matrix
    //----------------------------------
	
	private var _matrix:Array =  [1,0,0,0,0,0,
								  1,0,0,0,0,0,
								  1,0,0,0,0,0,
								  1,0];
	
	/**
	 *  A comma delimited list of 20 doubles that comprise a 4x5 matrix applied to the 
	 *  rendered element.  The matrix is in row major order -- that is, the first five 
	 *  elements are multipled by the vector [srcR,srcG,srcB,srcA,1] to determine the 
	 *  output red value, the second five determine the output green value, etc.
	 * 
	 *  The value must either be an array or comma delimited string of 20 numbers. 
	 * 
	 *  @langversion 3.0
	 *  @playerversion Flash 10
	 *  @playerversion AIR 1.5
	 *  @productversion Flex 4
	 */
	public function get matrix():Object
	{
		return _matrix;
	}
	
	public function set matrix(value:Object):void
	{
		if (value != _matrix)
		{
			if (value is Array)
			{
				_matrix = value as Array;
			}
			else if (value is String)
			{
				_matrix = String(value).split(',');
			}
			
			notifyFilterChanged();
		}
	}
	
	public function clone():BitmapFilter
	{
		return new flash.filters.ColorMatrixFilter(_matrix);
	}
	
}
}

{'fraction_non_alphanumeric': 0.16498316498316498, 'fraction_numerical': 0.019079685746352413, 'mean_word_length': 2.2152736019242334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2891796', 'n_tokens_mistral': 1743, 'n_tokens_neox': 1458, 'n_words': 557}