Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261230 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/graphics/codec/JPEGEncoder.as
+++ frameworks/projects/framework/src/mx/graphics/codec/JPEGEncoder.as
@@ -0,0 +1,1040 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 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.graphics.codec
+{
+
+import flash.display.BitmapData;
+import flash.utils.ByteArray;
+
+/**
+ *  The JPEGEncoder class converts raw bitmap images into encoded
+ *  images using Joint Photographic Experts Group (JPEG) compression.
+ *
+ *  For information about the JPEG algorithm, see the document
+ *  http://www.opennet.ru/docs/formats/jpeg.txt by Cristi Cuturicu.
+ */
+public class JPEGEncoder implements IImageEncoder
+{
+    include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static const CONTENT_TYPE:String = "image/jpeg";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param quality A value between 0.0 and 100.0.
+     *  The smaller the quality value,
+     *  the smaller the file size of the resultant image.
+     *  The value does not affect the encoding speed.
+     *. Note that even though this value is a number between 0.0 and 100.0,
+     *  it does not represent a percentage.
+	 *  The default value is 50.0.
+     */
+    public function JPEGEncoder(quality:Number = 50.0)
+    {
+    	super();
+
+        if (quality <= 0.0)
+            quality = 1.0;
+
+        if (quality > 100.0)
+            quality = 100.0;
+
+        var sf:int = 0;
+        if (quality < 50.0)
+            sf = int(5000 / quality);
+        else
+            sf = int(200 - quality * 2);
+
+        // Create tables
+        initHuffmanTbl();
+        initCategoryNumber();
+        initQuantTables(sf);
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constants
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+	 */
+    private const std_dc_luminance_nrcodes:Array =
+		[ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ];
+
+    /**
+	 *  @private
+	 */
+	private const std_dc_luminance_values:Array =
+		[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ];
+
+    /**
+	 *  @private
+	 */
+    private const std_dc_chrominance_nrcodes:Array =
+		[ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ];
+
+    /**
+	 *  @private
+	 */
+	private const std_dc_chrominance_values:Array =
+		[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ];
+
+    /**
+	 *  @private
+	 */
+	private const std_ac_luminance_nrcodes:Array =
+		[ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7D ];
+
+    /**
+	 *  @private
+	 */
+	private const std_ac_luminance_values:Array =
+	[
+        0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
+        0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
+        0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1, 0x08,
+        0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0,
+        0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16,
+        0x17, 0x18, 0x19, 0x1A, 0x25, 0x26, 0x27, 0x28,
+        0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+        0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
+        0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
+        0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
+        0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
+        0x7A, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
+        0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
+        0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,
+        0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6,
+        0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5,
+        0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4,
+        0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2,
+        0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA,
+        0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8,
+        0xF9, 0xFA
+    ];
+
+    /**
+	 *  @private
+	 */
+	private const std_ac_chrominance_nrcodes:Array =
+		[ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 ];
+
+    /**
+	 *  @private
+	 */
+	private const std_ac_chrominance_values:Array =
+	[
+        0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
+        0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
+        0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
+        0xA1, 0xB1, 0xC1, 0x09, 0x23, 0x33, 0x52, 0xF0,
+        0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16, 0x24, 0x34,
+        0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26,
+        0x27, 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38,
+        0x39, 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
+        0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
+        0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
+        0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
+        0x79, 0x7A, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+        0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96,
+        0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5,
+        0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4,
+        0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3,
+        0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2,
+        0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA,
+        0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9,
+        0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8,
+        0xF9, 0xFA
+    ];
+
+    /**
+	 *  @private
+	 */
+    private const ZigZag:Array =
+	[
+         0,  1,  5,  6, 14, 15, 27, 28,
+         2,  4,  7, 13, 16, 26, 29, 42,
+         3,  8, 12, 17, 25, 30, 41, 43,
+         9, 11, 18, 24, 31, 40, 44, 53,
+        10, 19, 23, 32, 39, 45, 52, 54,
+        20, 22, 33, 38, 46, 51, 55, 60,
+        21, 34, 37, 47, 50, 56, 59, 61,
+        35, 36, 48, 49, 57, 58, 62, 63
+    ];
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+	 *  Initialized by initHuffmanTbl() in constructor.
+	 */
+    private var YDC_HT:Array;
+
+    /**
+	 *  @private
+	 *  Initialized by initHuffmanTbl() in constructor.
+	 */
+    private var UVDC_HT:Array;
+
+    /**
+	 *  @private
+	 *  Initialized by initHuffmanTbl() in constructor.
+	 */
+    private var YAC_HT:Array;
+
+    /**
+	 *  @private
+	 *  Initialized by initHuffmanTbl() in constructor.
+	 */
+    private var UVAC_HT:Array;
+
+    /**
+	 *  @private
+	 *  Initialized by initCategoryNumber() in constructor.
+	 */
+	private var category:Array = new Array(65535);
+
+    /**
+	 *  @private
+	 *  Initialized by initCategoryNumber() in constructor.
+	 */
+    private var bitcode:Array = new Array(65535);
+
+    /**
+	 *  @private
+	 *  Initialized by initQuantTables() in constructor.
+	 */
+    private var YTable:Array = new Array(64);
+
+    /**
+	 *  @private
+	 *  Initialized by initQuantTables() in constructor.
+	 */
+    private var UVTable:Array = new Array(64);
+
+    /**
+	 *  @private
+	 *  Initialized by initQuantTables() in constructor.
+	 */
+    private var fdtbl_Y:Array = new Array(64);
+
+    /**
+	 *  @private
+	 *  Initialized by initQuantTables() in constructor.
+	 */
+    private var fdtbl_UV:Array = new Array(64);
+
+    /**
+	 *  @private
+	 *  The output ByteArray containing the encoded image data.
+	 */
+    private var byteout:ByteArray;
+
+    /**
+	 *  @private
+	 */
+    private var bytenew:int = 0;
+
+    /**
+	 *  @private
+	 */
+    private var bytepos:int = 7;
+
+    /**
+	 *  @private
+	 */
+    private var DU:Array = new Array(64);
+
+    /**
+	 *  @private
+	 */
+    private var YDU:Array = new Array(64);
+
+    /**
+	 *  @private
+	 */
+	private var UDU:Array = new Array(64);
+
+    /**
+	 *  @private
+	 */
+	private var VDU:Array = new Array(64);
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  contentType
+	//----------------------------------
+
+    /**
+     *  The MIME type for the JPEG encoded image.
+     *  The value is "image/jpeg".
+     */
+    public function get contentType():String
+    {
+        return CONTENT_TYPE;
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Converts the pixels of BitmapData object
+	 *  to a JPEG-encoded ByteArray object.
+     *
+     *  @param bitmapData The input BitmapData object.
+     *
+     *  @returns A ByteArray object containing JPEG-encoded image data.
+     */
+    public function encode(bitmapData:BitmapData):ByteArray
+    {
+        return internalEncode(bitmapData, bitmapData.width, bitmapData.height,
+							  bitmapData.transparent);
+    }
+
+    /**
+     *  Converts a ByteArray object containing raw pixels
+	 *  in 32-bit ARGB (Alpha, Red, Green, Blue) format
+	 *  to a new JPEG-encoded ByteArray object.
+	 *  The original ByteArray is left unchanged.
+	 *  Transparency is not supported; however you still must represent
+	 *  each pixel as four bytes in ARGB format.
+     *
+     *  @param byteArray The input ByteArray object containing raw pixels.
+	 *  This ByteArray should contain
+	 *  4 * width * height bytes.
+	 *  Each pixel is represented by 4 bytes, in the order ARGB.
+	 *  The first four bytes represent the top-left pixel of the image.
+	 *  The next four bytes represent the pixel to its right, etc.
+	 *  Each row follows the previous one without any padding.
+     *
+     *  @param width The width of the input image, in pixels.
+     *
+     *  @param height The height of the input image, in pixels.
+     *
+     *  @param transparent If false,
+	 *  alpha channel information is ignored.
+     *
+     *  @returns A ByteArray object containing JPEG-encoded image data.
+     */
+    public function encodeByteArray(byteArray:ByteArray, width:int, height:int,
+									transparent:Boolean = true):ByteArray
+    {
+        return internalEncode(byteArray, width, height, transparent);
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods: Initialization
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+	 *  Initializes the Huffman tables YDC_HT, UVDC_HT, YAC_HT, and UVAC_HT.
+	 */
+    private function initHuffmanTbl():void
+    {
+        YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,
+								   std_dc_luminance_values);
+
+        UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,
+									std_dc_chrominance_values);
+
+        YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,
+								   std_ac_luminance_values);
+
+        UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,
+									std_ac_chrominance_values);
+    }
+
+    /**
+	 *  @private
+	 */
+    private function computeHuffmanTbl(nrcodes:Array, std_table:Array):Array
+    {
+        var codevalue:int = 0;
+        var pos_in_table:int = 0;
+
+		var HT:Array = [];
+
+		for (var k:int = 1; k <= 16; k++)
+        {
+            for (var j:int = 1; j <= nrcodes[k]; j++)
+            {
+                HT[std_table[pos_in_table]] = new BitString();
+                HT[std_table[pos_in_table]].val = codevalue;
+                HT[std_table[pos_in_table]].len = k;
+
+				pos_in_table++;
+				codevalue++;
+            }
+
+            codevalue *= 2;
+        }
+
+        return HT;
+    }
+
+    /**
+	 *  @private
+	 *  Initializes the category and bitcode arrays.
+	 */
+    private function initCategoryNumber():void
+    {
+        var nr:int;
+
+		var nrlower:int = 1;
+        var nrupper:int = 2;
+
+		for (var cat:int = 1; cat <= 15; cat++)
+        {
+            // Positive numbers
+            for (nr = nrlower; nr < nrupper; nr++)
+            {
+                category[32767 + nr] = cat;
+
+				bitcode[32767 + nr] = new BitString();
+                bitcode[32767 + nr].len = cat;
+                bitcode[32767 + nr].val = nr;
+            }
+
+            // Negative numbers
+            for (nr = -(nrupper - 1); nr <= -nrlower; nr++)
+            {
+                category[32767 + nr] = cat;
+
+				bitcode[32767 + nr] = new BitString();
+                bitcode[32767 + nr].len = cat;
+                bitcode[32767 + nr].val = nrupper - 1 + nr;
+            }
+
+            nrlower <<= 1;
+            nrupper <<= 1;
+        }
+    }
+
+    /**
+	 *  @private
+	 *  Initializes YTable, UVTable, fdtbl_Y, and fdtbl_UV.
+	 */
+    private function initQuantTables(sf:int):void
+    {
+        var i:int = 0;
+        var t:Number;
+
+        var YQT:Array =
+		[
+            16, 11, 10, 16,  24,  40,  51,  61,
+            12, 12, 14, 19,  26,  58,  60,  55,
+            14, 13, 16, 24,  40,  57,  69,  56,
+            14, 17, 22, 29,  51,  87,  80,  62,
+            18, 22, 37, 56,  68, 109, 103,  77,
+            24, 35, 55, 64,  81, 104, 113,  92,
+            49, 64, 78, 87, 103, 121, 120, 101,
+            72, 92, 95, 98, 112, 100, 103,  99
+        ];
+
+        for (i = 0; i < 64; i++)
+		{
+            t = Math.floor((YQT[i] * sf + 50)/100);
+            if (t < 1)
+                t = 1;
+            else if (t > 255)
+                t = 255;
+            YTable[ZigZag[i]] = t;
+        }
+
+        var UVQT:Array =
+		[
+            17, 18, 24, 47, 99, 99, 99, 99,
+            18, 21, 26, 66, 99, 99, 99, 99,
+            24, 26, 56, 99, 99, 99, 99, 99,
+            47, 66, 99, 99, 99, 99, 99, 99,
+            99, 99, 99, 99, 99, 99, 99, 99,
+            99, 99, 99, 99, 99, 99, 99, 99,
+            99, 99, 99, 99, 99, 99, 99, 99,
+            99, 99, 99, 99, 99, 99, 99, 99
+        ];
+
+        for (i = 0; i < 64; i++)
+		{
+            t = Math.floor((UVQT[i] * sf + 50) / 100);
+            if (t < 1)
+                t = 1;
+            else if (t > 255)
+                t = 255;
+            UVTable[ZigZag[i]] = t;
+        }
+
+        var aasf:Array =
+		[
+            1.0, 1.387039845, 1.306562965, 1.175875602,
+            1.0, 0.785694958, 0.541196100, 0.275899379
+        ];
+
+        i = 0;
+        for (var row:int = 0; row < 8; row++)
+        {
+            for (var col:int = 0; col < 8; col++)
+            {
+                fdtbl_Y[i] =
+					(1.0 / (YTable [ZigZag[i]] * aasf[row] * aasf[col] * 8.0));
+
+				fdtbl_UV[i] =
+					(1.0 / (UVTable[ZigZag[i]] * aasf[row] * aasf[col] * 8.0));
+
+				i++;
+            }
+        }
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods: Core processing
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+	 */
+	private function internalEncode(source:Object, width:int, height:int,
+									transparent:Boolean = true):ByteArray
+    {
+    	// The source is either a BitmapData or a ByteArray.
+    	var sourceBitmapData:BitmapData = source as BitmapData;
+    	var sourceByteArray:ByteArray = source as ByteArray;
+
+        // Initialize bit writer
+        byteout = new ByteArray();
+        bytenew = 0;
+        bytepos = 7;
+
+        // Add JPEG headers
+        writeWord(0xFFD8); // SOI
+        writeAPP0();
+        writeDQT();
+        writeSOF0(width, height);
+        writeDHT();
+        writeSOS();
+
+        // Encode 8x8 macroblocks
+        var DCY:Number = 0;
+        var DCU:Number = 0;
+        var DCV:Number = 0;
+        bytenew = 0;
+        bytepos = 7;
+
+        for (var ypos:int = 0; ypos < height; ypos += 8)
+        {
+            for (var xpos:int = 0; xpos < width; xpos += 8)
+            {
+                RGB2YUV(sourceBitmapData, sourceByteArray, xpos, ypos, width, height);
+
+				DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+                DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
+                DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
+            }
+        }
+
+        // Do the bit alignment of the EOI marker
+        if (bytepos >= 0)
+        {
+            var fillbits:BitString = new BitString();
+            fillbits.len = bytepos + 1;
+            fillbits.val = (1 << (bytepos + 1)) - 1;
+            writeBits(fillbits);
+        }
+
+        // Add EOI
+		writeWord(0xFFD9);
+
+		return byteout;
+    }
+
+    /**
+	 *  @private
+	 */
+    private function RGB2YUV(sourceBitmapData:BitmapData,
+							 sourceByteArray:ByteArray,
+							 xpos:int, ypos:int,
+							 width:int, height:int):void
+    {
+        var k:int = 0; // index into 64-element block arrays
+
+		for (var j:int = 0; j < 8; j++)
+        {
+	        var y:int = ypos + j;
+	        if (y >= height)
+	        	y = height - 1;
+
+            for (var i:int = 0; i < 8; i++)
+            {
+		        var x:int = xpos + i;
+		        if (x >= width)
+		        	x = width - 1;
+
+		        var pixel:uint;
+		        if (sourceBitmapData)
+		        {
+		            pixel = sourceBitmapData.getPixel32(x, y);
+		        }
+		        else
+		        {
+		            sourceByteArray.position = 4 * (y * width + x);
+		            pixel = sourceByteArray.readUnsignedInt();
+		        }
+
+                var r:Number = Number((pixel >> 16) & 0xFF);
+                var g:Number = Number((pixel >> 8) & 0xFF);
+                var b:Number = Number(pixel & 0xFF);
+
+                YDU[k] =  0.29900 * r + 0.58700 * g + 0.11400 * b - 128.0;
+                UDU[k] = -0.16874 * r - 0.33126 * g + 0.50000 * b;
+                VDU[k] =  0.50000 * r - 0.41869 * g - 0.08131 * b;
+
+				k++;
+            }
+        }
+    }
+
+    /**
+	 *  @private
+	 */
+    private function processDU(CDU:Array, fdtbl:Array, DC:Number,
+							   HTDC:Array, HTAC:Array):Number
+    {
+        var EOB:BitString = HTAC[0x00];
+        var M16zeroes:BitString = HTAC[0xF0];
+        var i:int;
+
+        var DU_DCT:Array = fDCTQuant(CDU, fdtbl);
+
+		// ZigZag reorder
+        for (i = 0; i < 64; i++)
+        {
+            DU[ZigZag[i]] = DU_DCT[i];
+        }
+
+        var Diff:int = DU[0] - DC;
+		DC = DU[0];
+
+		// Encode DC
+        if (Diff == 0)
+        {
+            writeBits(HTDC[0]); // Diff might be 0
+        }
+        else
+        {
+            writeBits(HTDC[category[32767 + Diff]]);
+            writeBits(bitcode[32767 + Diff]);
+        }
+
+		// Encode ACs
+        var end0pos:int = 63;
+        for (; (end0pos > 0) && (DU[end0pos] == 0); end0pos--)
+        {
+        };
+
+        // end0pos = first element in reverse order != 0
+        if (end0pos == 0)
+        {
+            writeBits(EOB);
+            return DC;
+        }
+
+        i = 1;
+        while (i <= end0pos)
+        {
+            var startpos:int = i;
+            for (; (DU[i] == 0) && (i <= end0pos); i++)
+            {
+            }
+            var nrzeroes:int = i - startpos;
+
+            if (nrzeroes >= 16)
+            {
+                for (var nrmarker:int = 1; nrmarker <= nrzeroes / 16; nrmarker++)
+                {
+                    writeBits(M16zeroes);
+                }
+                nrzeroes = int(nrzeroes & 0xF);
+            }
+
+            writeBits(HTAC[nrzeroes * 16 + category[32767 + DU[i]]]);
+            writeBits(bitcode[32767 + DU[i]]);
+
+			i++;
+        }
+
+        if (end0pos != 63)
+            writeBits(EOB);
+
+        return DC;
+    }
+
+    /**
+	 *  @private
+	 */
+	private function fDCTQuant(data:Array, fdtbl:Array):Array
+    {
+        // Pass 1: process rows.
+        var dataOff:int = 0;
+        var i:int;
+        for (i = 0; i < 8; i++)
+        {
+            var tmp0:Number = data[dataOff + 0] + data[dataOff + 7];
+            var tmp7:Number = data[dataOff + 0] - data[dataOff + 7];
+            var tmp1:Number = data[dataOff + 1] + data[dataOff + 6];
+            var tmp6:Number = data[dataOff + 1] - data[dataOff + 6];
+            var tmp2:Number = data[dataOff + 2] + data[dataOff + 5];
+            var tmp5:Number = data[dataOff + 2] - data[dataOff + 5];
+            var tmp3:Number = data[dataOff + 3] + data[dataOff + 4];
+            var tmp4:Number = data[dataOff + 3] - data[dataOff + 4];
+
+            // Even part
+            var tmp10:Number = tmp0 + tmp3;	// phase 2
+            var tmp13:Number = tmp0 - tmp3;
+            var tmp11:Number = tmp1 + tmp2;
+            var tmp12:Number = tmp1 - tmp2;
+
+            data[dataOff + 0] = tmp10 + tmp11; // phase 3
+            data[dataOff + 4] = tmp10 - tmp11;
+
+            var z1:Number = (tmp12 + tmp13) * 0.707106781; // c4
+            data[dataOff + 2] = tmp13 + z1; // phase 5
+            data[dataOff + 6] = tmp13 - z1;
+
+            // Odd part
+            tmp10 = tmp4 + tmp5; // phase 2
+            tmp11 = tmp5 + tmp6;
+            tmp12 = tmp6 + tmp7;
+
+            // The rotator is modified from fig 4-8 to avoid extra negations.
+            var z5:Number = (tmp10 - tmp12) * 0.382683433; // c6
+            var z2:Number = 0.541196100 * tmp10 + z5; // c2 - c6
+            var z4:Number = 1.306562965 * tmp12 + z5; // c2 + c6
+            var z3:Number = tmp11 * 0.707106781; // c4
+
+            var z11:Number = tmp7 + z3; // phase 5
+            var z13:Number = tmp7 - z3;
+
+            data[dataOff + 5] = z13 + z2; // phase 6
+            data[dataOff + 3] = z13 - z2;
+            data[dataOff + 1] = z11 + z4;
+            data[dataOff + 7] = z11 - z4;
+
+            dataOff += 8; // advance pointer to next row
+        }
+
+        // Pass 2: process columns.
+        dataOff = 0;
+        for (i = 0; i < 8; i++)
+        {
+            tmp0 = data[dataOff +  0] + data[dataOff + 56];
+            tmp7 = data[dataOff +  0] - data[dataOff + 56];
+            tmp1 = data[dataOff +  8] + data[dataOff + 48];
+            tmp6 = data[dataOff +  8] - data[dataOff + 48];
+            tmp2 = data[dataOff + 16] + data[dataOff + 40];
+            tmp5 = data[dataOff + 16] - data[dataOff + 40];
+            tmp3 = data[dataOff + 24] + data[dataOff + 32];
+            tmp4 = data[dataOff + 24] - data[dataOff + 32];
+
+            // Even par
+            tmp10 = tmp0 + tmp3; // phase 2
+            tmp13 = tmp0 - tmp3;
+            tmp11 = tmp1 + tmp2;
+            tmp12 = tmp1 - tmp2;
+
+            data[dataOff +  0] = tmp10 + tmp11; // phase 3
+            data[dataOff + 32] = tmp10 - tmp11;
+
+            z1 = (tmp12 + tmp13) * 0.707106781; // c4
+            data[dataOff + 16] = tmp13 + z1; // phase 5
+            data[dataOff + 48] = tmp13 - z1;
+
+            // Odd part
+            tmp10 = tmp4 + tmp5; // phase 2
+            tmp11 = tmp5 + tmp6;
+            tmp12 = tmp6 + tmp7;
+
+            // The rotator is modified from fig 4-8 to avoid extra negations.
+            z5 = (tmp10 - tmp12) * 0.382683433; // c6
+            z2 = 0.541196100 * tmp10 + z5; // c2 - c6
+            z4 = 1.306562965 * tmp12 + z5; // c2 + c6
+            z3 = tmp11 * 0.707106781; // c4
+
+            z11 = tmp7 + z3; // phase 5 */
+            z13 = tmp7 - z3;
+
+            data[dataOff + 40] = z13 + z2; // phase 6
+            data[dataOff + 24] = z13 - z2;
+            data[dataOff +  8] = z11 + z4;
+            data[dataOff + 56] = z11 - z4;
+
+            dataOff++; // advance pointer to next column
+        }
+
+        // Quantize/descale the coefficients
+        for (i = 0; i < 64; i++)
+        {
+            // Apply the quantization and scaling factor
+			// and round to nearest integer
+            data[i] = Math.round((data[i] * fdtbl[i]));
+        }
+
+        return data;
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods: Output
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+	 */
+    private function writeBits(bs:BitString):void
+    {
+        var value:int = bs.val;
+        var posval:int = bs.len - 1;
+        while (posval >= 0)
+        {
+            if (value & uint(1 << posval) )
+            {
+                bytenew |= uint(1 << bytepos);
+            }
+            posval--;
+            bytepos--;
+            if (bytepos < 0)
+            {
+                if (bytenew == 0xFF)
+                {
+                    writeByte(0xFF);
+                    writeByte(0);
+                }
+                else
+                {
+                    writeByte(bytenew);
+                }
+                bytepos = 7;
+                bytenew = 0;
+            }
+        }
+    }
+
+    /**
+	 *  @private
+	 */
+    private function writeByte(value:int):void
+    {
+        byteout.writeByte(value);
+    }
+
+    /**
+	 *  @private
+	 */
+    private function writeWord(value:int):void
+    {
+        writeByte((value >> 8) & 0xFF);
+        writeByte(value & 0xFF);
+    }
+
+    /**
+	 *  @private
+	 */
+    private function writeAPP0():void
+    {
+        writeWord(0xFFE0);	// marker
+        writeWord(16);		// length
+        writeByte(0x4A);	// J
+        writeByte(0x46);	// F
+        writeByte(0x49);	// I
+        writeByte(0x46);	// F
+        writeByte(0);		// = "JFIF",'\0'
+        writeByte(1);		// versionhi
+        writeByte(1);		// versionlo
+        writeByte(0);		// xyunits
+        writeWord(1);		// xdensity
+        writeWord(1);		// ydensity
+        writeByte(0);		// thumbnwidth
+        writeByte(0);		// thumbnheight
+    }
+
+    /**
+	 *  @private
+	 */
+    private function writeDQT():void
+    {
+        writeWord(0xFFDB);	// marker
+        writeWord(132);     // length
+        writeByte(0);
+        var i:int;
+
+        for (i = 0; i < 64; i++)
+        {
+            writeByte(YTable[i]);
+        }
+
+        writeByte(1);
+
+        for (i = 0; i < 64; i++)
+        {
+            writeByte(UVTable[i]);
+        }
+    }
+
+    /**
+	 *  @private
+	 */
+    private function writeSOF0(width:int, height:int):void
+    {
+        writeWord(0xFFC0);	// marker
+        writeWord(17);		// length, truecolor YUV JPG
+        writeByte(8);		// precision
+        writeWord(height);
+        writeWord(width);
+        writeByte(3);		// nrofcomponents
+        writeByte(1);		// IdY
+        writeByte(0x11);	// HVY
+        writeByte(0);		// QTY
+        writeByte(2);		// IdU
+        writeByte(0x11);	// HVU
+        writeByte(1);		// QTU
+        writeByte(3);		// IdV
+        writeByte(0x11);	// HVV
+        writeByte(1);		// QTV
+    }
+
+    /**
+	 *  @private
+	 */
+    private function writeDHT():void
+    {
+        var i:int;
+
+        writeWord(0xFFC4); // marker
+        writeWord(0x01A2); // length
+
+        writeByte(0); // HTYDCinfo
+        for (i = 0; i < 16; i++)
+        {
+            writeByte(std_dc_luminance_nrcodes[i + 1]);
+        }
+        for (i = 0; i <= 11; i++)
+        {
+            writeByte(std_dc_luminance_values[i]);
+        }
+
+        writeByte(0x10); // HTYACinfo
+        for (i = 0; i < 16; i++)
+        {
+            writeByte(std_ac_luminance_nrcodes[i + 1]);
+        }
+        for (i = 0; i <= 161; i++)
+        {
+            writeByte(std_ac_luminance_values[i]);
+        }
+
+        writeByte(1); // HTUDCinfo
+        for (i = 0; i < 16; i++)
+        {
+            writeByte(std_dc_chrominance_nrcodes[i + 1]);
+        }
+        for (i = 0; i <= 11; i++)
+        {
+            writeByte(std_dc_chrominance_values[i]);
+        }
+
+        writeByte(0x11); // HTUACinfo
+        for (i = 0; i < 16; i++)
+        {
+            writeByte(std_ac_chrominance_nrcodes[i + 1]);
+        }
+        for (i = 0; i <= 161; i++)
+        {
+            writeByte(std_ac_chrominance_values[i]);
+        }
+    }
+
+    /**
+	 *  @private
+	 */
+    private function writeSOS():void
+    {
+        writeWord(0xFFDA);	// marker
+        writeWord(12);		// length
+        writeByte(3);		// nrofcomponents
+        writeByte(1);		// IdY
+        writeByte(0);		// HTY
+        writeByte(2);		// IdU
+        writeByte(0x11);	// HTU
+        writeByte(3);		// IdV
+        writeByte(0x11);	// HTV
+        writeByte(0);		// Ss
+        writeByte(0x3f);	// Se
+        writeByte(0);		// Bf
+    }
+}
+
+}
+
+class BitString
+{
+	/**
+     *  Constructor.
+     */
+    public function BitString()
+    {
+    	super();
+    }
+
+	/**
+     *  @private
+     */
+    public var len:int = 0;
+
+	/**
+     *  @private
+     */
+    public var val:int = 0;
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12052
Author:   clucier@adobe.com
Date:     2009-11-20T18:38:19.094091Z

Log Message:
-----------
We now issue runtime warnings for incompatible embedded fonts as we detect their use.

QE notes: You might want to create a couple tests around this.
Doc notes: None.
Bugs: SDK-23920.
Reviewer: Alex, Darrell
Tests run: Checkin
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/bundles/en_US/core.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280197 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -3215,29 +3215,12 @@
             var bold:Boolean = getStyle("fontWeight") == "bold";
             var italic:Boolean = getStyle("fontStyle") == "italic";

+            var localLookup:ISystemManager =
+                fontContext && fontContext is ISystemManager ?
+                ISystemManager(fontContext) : systemManager;
+
             fontContext = embeddedFontRegistry.getAssociatedModuleFactory(
-                font, bold, italic, this, moduleFactory);
-
-            // If we found the font, then it is embedded.
-            // But some fonts are not listed in info()
-            // and are therefore not in the above registry.
-            // So we call isFontFaceEmbedded() which gets the list
-            // of embedded fonts from the player.
-            if (!fontContext)
-            {
-                var sm:ISystemManager;
-                if (moduleFactory != null && moduleFactory is ISystemManager)
-                    sm = ISystemManager(moduleFactory);
-                else if (parent is IUIComponent)
-                    sm = IUIComponent(parent).systemManager;
-
-                staticTextFormat.font = font;
-                staticTextFormat.bold = bold;
-                staticTextFormat.italic = italic;
-
-                if (sm != null && sm.isFontFaceEmbedded(staticTextFormat))
-                    fontContext = sm;
-            }
+                font, bold, italic, this, fontContext, localLookup, true);
         }

         if (!fontContext && fontLookup == FontLookup.EMBEDDED_CFF)


Transferred from the Adobe Open Source Subversion Repository

Revision: 3755
Author:   chaase@adobe.com
Date:     2008-10-20T21:09:39.321431Z

Log Message:
-----------
Fixed sdk-17414, sdk-17413, sdk-17409. Also fixed various small asdoc errors (related to recent classname changes).

QE Notes: None
Doc Notes: None
Bugs: sdk-17414, sdk-17413, sdk-17409
Reviewer: Hans

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/PauseInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Pause.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/PropertyValuesHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/IInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxMove.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1283886 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/effects/animation/Animation.as
+++ frameworks/projects/spark/src/spark/effects/animation/Animation.as
@@ -18,13 +18,13 @@
 import flash.utils.Timer;
 import flash.utils.getTimer;

+import mx.effects.interpolation.ArrayInterpolator;
 import mx.effects.interpolation.IEaser;
+import mx.effects.interpolation.IInterpolator;
 import mx.effects.interpolation.Linear;
-import mx.effects.interpolation.Sine;
-import mx.effects.interpolation.ArrayInterpolator;
-import mx.effects.interpolation.IInterpolator;
 import mx.effects.interpolation.NumberArrayInterpolator;
 import mx.effects.interpolation.NumberInterpolator;
+import mx.effects.interpolation.Sine;
 import mx.events.AnimationEvent;

 /**
@@ -521,7 +521,7 @@
             }
         }
         // If no more animations running or pending, stop the timer
-        if (activeAnimations.length == 0 && delayedStartAnims.length == 0)
+        if (timer && activeAnimations.length == 0 && delayedStartAnims.length == 0)
         {
             _intervalTime = NaN;
             timer.reset();
@@ -543,12 +543,20 @@
         _intervalTime = Timeline.pulse();

         var n:int = activeAnimations.length;
-
-        for (var i:int = 0; i < n; ++i)
-        {
+        var i:int = 0;
+
+        while (i < activeAnimations.length)
+        {
+            // only increment index into array if no animation was stopped
+            // as a result to call to doInterval(). Stopped animations
+            // will be removed from the array and everything after them
+            // shifts down
+            var incrementIndex:Boolean = true;
             var animation:Animation = Animation(activeAnimations[i]);
             if (animation)
-                animation.doInterval();
+                incrementIndex = !animation.doInterval();
+            if (incrementIndex)
+                ++i;
         }

         // Check to see whether it's time to start any delayed animations
@@ -693,8 +701,6 @@
      */
     public function end():void
     {
-        removeFromDelayedAnimations();
-
         // TODO (chaase): Check whether we already send out a final
         // UPDATE event with the end value; if so, this dup should be
         // removed
@@ -705,14 +711,8 @@
         sendAnimationEvent(AnimationEvent.ANIMATION_UPDATE, value);
         sendAnimationEvent(AnimationEvent.ANIMATION_END, value);

-        // If animation has been added, id >= 0
-        // but if duration = 0, this might not be the case.
-        if (id >= 0)
-            Animation.removeAnimationAt(id);
-
-        _invertValues = false;
-        _doReverse = false;
-        _isPlaying = false;
+        // The rest of what we need to do is handled by the stop() function
+        stop();
     }

     /**
@@ -872,10 +872,13 @@
     public function stop():void
     {
         removeFromDelayedAnimations();
-
+        // If animation has been added, id >= 0
+        // but if duration = 0, this might not be the case.
         if (id >= 0)
+        {
             Animation.removeAnimationAt(id);
-
+            id = -1;
+        }
         _doReverse = false
         _invertValues = false;
         _isPlaying = false;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17366
Author:   rfrishbe@adobe.com
Date:     2010-08-18T20:55:44.548390Z

Log Message:
-----------
Adding touchDelay and minimumDownState styles to Button.

In addition, there are some other PARB changes (touchScroll is renamed to more generic gestureCapture).  This means TouchScrollEvent has been renamed to GestureCaptureEvent as well.

QE notes: None
Doc notes: None
Bugs: -
Reviewer: Chiedo
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/TouchScrollEvent.as" copyfrom-rev="17335" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/GestureCaptureEvent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata/MobileTextFieldTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileIconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/TouchScrollEvent.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1258405 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/FrameworkClasses.as
+++ frameworks/projects/framework/src/FrameworkClasses.as
@@ -85,6 +85,8 @@
     import mx.events.IndexChangedEvent; IndexChangedEvent;
 	import mx.events.ItemClickEvent; ItemClickEvent;
 	import mx.events.ModuleEvent; ModuleEvent;
+    import mx.events.GestureCaptureEvent; GestureCaptureEvent;
+    import mx.events.GestureCaptureReason; GestureCaptureReason;
 	import mx.filters.BaseFilter; BaseFilter;
 	import mx.filters.BaseDimensionFilter; BaseDimensionFilter;
 	import mx.filters.IBitmapFilter; IBitmapFilter;


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1269307 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/core/ContainerLayout.as
+++ frameworks/projects/mx/src/mx/core/ContainerLayout.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2006 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 10050
Author:   dloverin@adobe.com
Date:     2009-09-08T14:43:16.690474Z

Log Message:
-----------
Per-Module Style Management: Create a style manager for each application/module.

The singleton StyleManager is still the only style manager that is currently used.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex
Tests run: checkintests, Managers/StyleManager
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IFlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/IModuleInfo.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1269680 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/modules/ModuleLoader.as
+++ frameworks/projects/mx/src/mx/modules/ModuleLoader.as
@@ -354,7 +354,7 @@
         module.addEventListener(ModuleEvent.ERROR, moduleErrorHandler);
         module.addEventListener(ModuleEvent.UNLOAD, moduleUnloadHandler);

-        module.load(applicationDomain, null, bytes);
+        module.load(applicationDomain, null, bytes, moduleFactory);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 10759
Author:   chaase@adobe.com
Date:     2009-09-30T20:29:28.049407Z

Log Message:
-----------
Fixes bug in transform effects on nested group structures. We would calculate the transform center based on outdated width/height information for a group (because we took those values prior to running layout on the group, so it was not sized correctly).

The fix is to add width/height to the list of properties that transform effects care about (‘affectedProperties’). Then at those times when we calculate the transform center, we will use these cached values (which are correct at start/end time) rather than going out to the object to grab a potentially wrong value.

QE notes:  Handful of Mustella tests fail due to the new values of relevantProperties/affectedProperties for transform effects. We now care about width/height properties, too.
Doc notes: None
Bugs: SDK-23346
Reviewer: Jason
Tests run: checkintests, Mustella spark/effects, mx/effects/Parallel, mx/effects/Sequence
Is noteworthy for integration: Yes, downstream teams care about this bug

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1283654 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/effects/Move3D.as
+++ frameworks/projects/spark/src/spark/effects/Move3D.as
@@ -85,7 +85,8 @@
         ["translationX", "translationY", "translationZ",
          "postLayoutTranslationX","postLayoutTranslationY","postLayoutTranslationZ",
          "left", "right", "top", "bottom",
-         "horizontalCenter", "verticalCenter"];
+         "horizontalCenter", "verticalCenter",
+         "width", "height"];

     private static var RELEVANT_STYLES:Array =
         ["left", "right", "top", "bottom",


Transferred from the Adobe Open Source Subversion Repository

Revision: 5573
Author:   jimurphy@adobe.com
Date:     2009-03-26T15:11:59.159776Z

Log Message:
-----------
-more updated package and class names that were missed in the first pass
-remove the mx folder

qa: probably
doc: this updated more asdoc comments so you may want to make sure that this pass made the correct updates
checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/SetActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/IEaser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/DataGroupExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/pathSegments/PathSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxToggleButtonExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/AnimationEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/WipeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SetAction.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1283703 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/effects/Rotate.as
+++ frameworks/projects/spark/src/spark/effects/Rotate.as
@@ -28,7 +28,7 @@
  */
 public class AnimateTransformRotate extends AnimateTransform
 {
-    include "../../mx/core/Version.as";
+    include "../../spark.core.Version.as";

     //--------------------------------------------------------------------------
     //


FilteredColumn wrapper functions now always make internal column requests in case they trigger callbacks.

--- WeaveData/src/weave/data/AttributeColumns/FilteredColumn.as
+++ WeaveData/src/weave/data/AttributeColumns/FilteredColumn.as
@@ -56,7 +56,9 @@
 		private var _keys:Array;

 		override public function get keys():Array
-		{
+		{
+			// also make internal column request because it may trigger callbacks
+			internalDynamicColumn.keys;
 			return _filteredKeySet.keys;
 		}

@@ -64,16 +66,23 @@
 		 * The filter removes certain records from the column.  This function will return false if the key is not contained in the filter.
 		 */
 		override public function containsKey(key:IQualifiedKey):Boolean
-		{
+		{
+			// also make internal column request because it may trigger callbacks
+			internalDynamicColumn.containsKey(key);
 			return _filteredKeySet.containsKey(key);
 		}

 		override public function getValueFromKey(key:IQualifiedKey, dataType:Class = null):*
 		{
 			var column:IAttributeColumn = internalDynamicColumn.getInternalColumn();
-			var keyFilter:IKeyFilter = filter.getInternalKeyFilter();
-			if (column && (!keyFilter || keyFilter.containsKey(key)))
-				return column.getValueFromKey(key, dataType);
+			var keyFilter:IKeyFilter = filter.getInternalKeyFilter();
+			if (column)
+			{
+				// always make internal column request because it may trigger callbacks
+				var value:* = column.getValueFromKey(key, dataType);
+				if (!keyFilter || keyFilter.containsKey(key))
+					return value;
+			}

 			if (dataType)
 				return EquationColumnLib.cast(undefined, dataType);


Fixed a bug in getGeometriesFromRecordKey.

Change-Id: If4aa1ba2fe6b15ac09903d458e2fff88e308c3d2

--- WeaveUI/src/weave/visualization/plotters/GeometryPlotter.as
+++ WeaveUI/src/weave/visualization/plotters/GeometryPlotter.as
@@ -94,6 +94,7 @@
 		 * This is the reprojected geometry column to draw.
 		 */
 		public const geometryColumn:ReprojectedGeometryColumn = newSpatialProperty(ReprojectedGeometryColumn);
+
 		/**
 		 *  This is the default URL path for images, when using images in place of points.
 		 */
@@ -145,7 +146,7 @@
 			if (value is Array)
 				geoms = value;
 			else if (value is GeneralizedGeometry)
-				geoms [ value as GeneralizedGeometry ];
+				geoms = [ value as GeneralizedGeometry ];

 			var results:Array = [];
 			if (geoms != null)


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1259426 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/core/InteractionMode.as
+++ frameworks/projects/framework/src/mx/core/InteractionMode.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 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.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262872 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/utils/LinkedListNode.as
+++ frameworks/projects/framework/src/mx/utils/LinkedListNode.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1273574 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/messaging/SubscriptionInfo.as
+++ frameworks/projects/rpc/src/mx/messaging/SubscriptionInfo.as
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 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.messaging
+{
+
+/**
+ * This is the class used for elements of the ArrayCollection subscriptions property in the
+ * MultiTopicConsumer property.
+ */
+public class SubscriptionInfo
+{
+    /**
+     * The subtopic - if null, represents a subscription for messages directed to the
+     * destination with no subtopic.
+     */
+    public var subtopic:String;
+
+    /**
+     * The selector.  If null, indicates all messages should be sent.
+     */
+    public var selector:String;
+
+    /** Builds a new SubscriptionInfo with the specified subtopic and selector */
+    public function SubscriptionInfo(st:String, sel:String)
+    {
+        subtopic = st;
+        selector = sel;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6257
Author:   smgilson@adobe.com
Date:     2009-04-24T21:28:52.430843Z

Log Message:
-----------
ASDoc edits for effects

QE Notes: None
Doc Notes: None
Bugs: -
checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/IEaser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/RepeatBehavior.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EasingFraction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/IInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/RGBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/ArrayInterpolator.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1284060 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/effects/easing/Linear.as
+++ frameworks/projects/spark/src/spark/effects/easing/Linear.as
@@ -11,26 +11,41 @@
 package spark.effects.easing
 {
 /**
- * Provides easing functionality with three phases during
- * the animation: acceleration, uniform motion, and deceleration.
- * As the animation starts it will accelerate through the period
- * specified by the acceleration parameter, it will
- * then use uniform (linear) motion through the next phase, and
- * will finally decelerate until the end during the period specified
- * by the deceleration parameter.
+ *  The Linear class defines an easing with three phases:
+ *  acceleration, uniform motion, and deceleration.
+ *  As the animation starts it accelerates through the period
+ *  specified by the easeInFraction property, it
+ *  then uses uniform (linear) motion through the next phase, and
+ *  finally decelerates until the end during the period specified
+ *  by the easeOutFraction property.
  *
- *
The easing values for the three phases will be calculated
- * such that the behavior of constant acceleration, linear motion,
- * and constant deceleration will all occur within the specified
- * duration of the animation.

- *
- *
Strict linear motion can be achieved by setting both
- * acceleration and deceleration to 0. Note that if acceleration or
- * deceleration are not zero, then the motion during the middle
- * phase will not be at the same speed as that of pure
- * linear motion. The middle phase consists of
- * uniform motion, but the speed of that motion is determined by
- * the size of that phase relative to the overall curve.

+ *
The easing values for the three phases are calculated
+ *  such that the behavior of constant acceleration, linear motion,
+ *  and constant deceleration all occur within the specified
+ *  duration of the animation.

+ *
+ *
Strict linear motion can be achieved by setting
+ *  easeInFraction and easeOutFraction to 0.0.
+ *  Note that if acceleration or
+ *  deceleration are not 0.0, then the motion during the middle
+ *  phase is not at the same speed as that of pure
+ *  linear motion. The middle phase consists of
+ *  uniform motion, but the speed of that motion is determined by
+ *  the size of that phase relative to the overall animation.

+ *
+ *  @mxml
+ *
+ *
The <mx:Linear> tag
+ *  inherits all of the tag attributes of its of its superclass,
+ *  and adds the following tag attributes:

+ *
+ *

+ *  <mx:Linear
+ *    id="ID"
+ *    easeInFraction="0"
+ *    easeOutFraction="0"
+ *   />
+ *

  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -40,8 +55,13 @@
 public class Linear implements IEaser
 {
     /**
-     * Constructs a Linear instance with optional acceleration and
-     * deceleration parameters.
+     *  Constructor.
+     *
+     *  @param easeInFraction The fraction of the overall duration
+     *  in the acceleration phase, between 0.0 and 1.0.
+     *
+     *  @param easeOutFraction The fraction of the overall duration
+     *  in the deceleration phase, between 0.0 and 1.0.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -57,7 +77,9 @@
     private static var instance:Linear;

     /**
-     * Returns the singleton instance of Linear.
+     *  Returns the singleton instance of the Linear class.
+     *
+     *  @return The singleton instance of the Linear class.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -83,13 +105,14 @@
     private var _easeInFraction:Number = 0;

     /**
-     * The percentage an animation will spend accelerating.
-     * easeOutFraction and easeInFraction must satisfy the
-     * equation easeOutFraction + easeInFraction <= 1
-     * where any remaining time in the middle will be spent in
-     * linear interpolation.
-     *
-     * @default 0
+     *  The fraction an animation spent accelerating,
+     *  between 0.0 and 1.0.
+     *  The values of the easeOutFraction property
+     *  and easeInFraction property must satisfy the
+     *  equation easeOutFraction + easeInFraction <= 1
+     *  where any remaining time is spent in the linear motion phase.
+     *
+     *  @default 0
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -116,13 +139,14 @@
     private var _easeOutFraction:Number = 0;

     /**
-     * The percentage an animation will spend decelerating.
-     * easeOutFraction and easeInFraction must satisfy the
-     * equation easeOutFraction + easeInFraction <= 1
-     * where any remaining time in the middle will be spent in
-     * linear interpolation.
-     *
-     * @default 0
+     *  The percentage an animation will spend decelerating,
+     *  between 0.0 and 1.0.
+     *  The values of the easeOutFraction property
+     *  and easeInFraction property must satisfy the
+     *  equation easeOutFraction + easeInFraction <= 1
+     *  where any remaining time is spent in the linear motion phase.
+     *
+     *  @default 0
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -140,21 +164,23 @@

     /**
-     * @inheritDoc
-     *
-     * Calculates the eased fraction value based on the
-     * easeInFraction and easeOutFraction
-     * factors. If fraction
-     * is less than easeInFraction, it calculates a value
-     * based on accelerating up to the linear phase. If fraction
-     * is greater than easeInFraction and less than
-     * (1-easeOutFraction), it calculates a value based
-     * on linear motion between the easing-in and easing-out phases.
-     * Otherwise, it calculates a value based on constant deceleration
-     * between the linear motion phase and zero.
-     *
-     * @param fraction The elapsed fraction of the animation
-     * @return The eased fraction of the animation
+     *  Calculates the eased fraction value based on the
+     *  easeInFraction and easeOutFraction
+     *  properties.
+     *  If fraction
+     *  is less than easeInFraction, it calculates a value
+     *  based on accelerating up to the linear moiton phase.
+     *  If fraction
+     *  is greater than easeInFraction and less than
+     *  (1-easeOutFraction), it calculates a value based
+     *  on the linear motion phase between the easing in and easing out phases.
+     *  Otherwise, it calculates a value based on constant deceleration
+     *  between the linear motion phase and 0.0.
+     *
+     *  @param fraction The elapsed fraction of the animation,
+     *  between 0.0 and 1.0..
+     *
+     *  @return The eased fraction of the animation.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


Better level info

Better level info

--- src/Displays/DGoal.as
+++ src/Displays/DGoal.as
@@ -38,13 +38,29 @@
 			//bg.alpha = 0.67;
 			add(bg);

-			var title:FlxText = new FlxText(bg.x + 8, bg.y + 8, bg.width - 16, level.name);
+			var X:int = bg.x + 8;
+			var Width:int = bg.width - 16;
+			var title:FlxText = new FlxText(X, bg.y + 8, Width, level.name);
 			title.setFormat(U.FONT, U.FONT_SIZE * 2, 0xffffff, 'center');
 			add(title);
+			var Y:int = title.y + title.height + 8;

-			var description:FlxText = new FlxText(bg.x + 8, title.y + title.height + 8, bg.width - 16, level.goal.description);
+			var description:FlxText = new FlxText(X, Y, Width, level.goal.description);
 			description.setFormat(U.FONT, U.FONT_SIZE);
 			add(description);
+			Y = description.y + description.height + 16;
+
+			if (level.expectedOps.length) {
+				var expectedOps:FlxText = new FlxText(X, Y, Width, "Ops to support: " + level.expectedOps.join(', ')).setFormat(U.FONT, U.FONT_SIZE);
+				add(expectedOps);
+				Y = expectedOps.y + expectedOps.height + 16;
+			}
+
+			if (level.delay) {
+				var delayEnabled:FlxText = new FlxText(X, Y, Width, "Propagation delay enabled.").setFormat(U.FONT, U.FONT_SIZE);
+				add(delayEnabled);
+				Y = delayEnabled.y + delayEnabled.height + 16;
+			}

 			//var goal:FlxText = new FlxText(description.x, description.y + description.height + 8, description.width,
 										   //"Goal: M["+
@@ -54,11 +70,9 @@
 			else
 				testType = "Simple run";

-			var testing:FlxText = new FlxText(description.x, description.y + description.height + 16, description.width,
-											  "Testing: "+testType + ", time limit of " + level.goal.timeLimit + " cycles");
+			var testing:FlxText = new FlxText(X, Y, Width, "Testing: "+testType + ", time limit of " + level.goal.timeLimit + " cycles").setFormat(U.FONT, U.FONT_SIZE);
 			if (level.goal is GeneratedGoal)
 				testing.text += " per test";
-			testing.setFormat(U.FONT, U.FONT_SIZE);
 			add(testing);
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 9309
Author:   jimurphy@adobe.com
Date:     2009-08-14T12:57:06.648526Z

Log Message:
-----------
Merged 3.x revisions 8758,8762-8763,8765,8844-8845,8906,8970,9030,9049,9055,9096-9097,9191,9208,9221,9228,9242,9278 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/LocaleSorter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLSchemaInstance.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1260840 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/formatters/DateBase.as
+++ frameworks/projects/framework/src/mx/formatters/DateBase.as
@@ -13,9 +13,8 @@
 {

 import flash.events.Event;
+
 import mx.core.mx_internal;
-import mx.managers.ISystemManager;
-import mx.managers.SystemManager;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;

@@ -548,6 +547,14 @@
 				result += setValue(sec, key);
 				return result;
 			}
+
+			case "Q":
+			{
+				// milliseconds in second
+				var ms:int = int(date.getMilliseconds());
+				result += setValue(ms, key);
+				return result;
+			}
 		}

 		return result;


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1270047 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/styles/metadata/TextStyles.as
+++ frameworks/projects/mx/src/mx/styles/metadata/TextStyles.as
@@ -1,25 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  Color of text in the component, including the component label.
- *
- *  The default value for the Halo theme is 0x0B333C.
- *  The default value for the Spark theme is 0x000000.
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Flex 3
- */
+
 [Style(name="color", type="uint", format="Color", inherit="yes")]

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1274252 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as
+++ frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-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.rpc.http.mxml
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3428
Author:   smgilson@adobe.com
Date:     2008-09-30T20:18:03.748186Z

Log Message:
-----------
add class level ASDoc comment

Checkin Test Passed: Yes
QA: No
Bug:
Doc: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1278637 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -47,6 +47,9 @@
 [Event(name="dataProviderChanged", type="flex.events.FlexEvent")]

 [DefaultProperty("dataProvider")]
+/**
+ *  Documentation is not currently available. .
+ */
 public class DataGroup extends GroupBase
 {
     public function DataGroup()
@@ -603,12 +606,12 @@
             delete maskElements[mask];
             dataProviderChanged = true;
              // TODO!! Remove this once GraphicElements use the LayoutManager. Currently the
-        	// callLater is necessary because removeMaskElement gets called inside of commitProperties
+            // callLater is necessary because removeMaskElement gets called inside of commitProperties
             callLater(invalidateProperties);
         }
     }
-
-	override public function addChild(child:DisplayObject):DisplayObject
+
+    override public function addChild(child:DisplayObject):DisplayObject
     {
         throw(new Error("addChild is not available in DataGroup. " +
                 "Use methods defined on the dataProvider instead"));


Transferred from the Adobe Open Source Subversion Repository

Revision: 20649
Author:   smgilson@adobe.com
Date:     2011-03-07T20:19:16.700368Z

Log Message:
-----------
ASDoc updates

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/animation/SimpleMotionPath.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/ContentRequest.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/interpolation/RGBInterpolator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/ContentCache.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/NavigationUnit.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1283228 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/core/IGraphicElement.as
+++ frameworks/projects/spark/src/spark/core/IGraphicElement.as
@@ -109,6 +109,11 @@
      *    into that same displayObject, and the first element that draws
      *    has its mode set to DisplayObjectMode.OWNS_SHARED_OBJECT

      *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
      function get displayObjectSharingMode():String;

@@ -167,7 +172,7 @@
      *  Determines whether this element can draw itself to the
      *  sharedDisplayObject of the sequence.
      *
-     *
Typically implementers will return true when this
+     *
Typically implementers return true when this
      *  IGraphicElement can cumulatively draw in the shared
      *  DisplayObject graphics property.
      *  In all cases where this IGraphicElement needs to set
@@ -176,7 +181,7 @@
      *  Examples for such properties are rotation, scale, transform,
      *  mask, alpha, filters, color transform, 3D, and layer.

      *
-     *
When this method returns true, subsequent calls to the getter of the
+     *
When this method returns true, subsequent calls to the getter of the
      *  displayObject property must return the same display object.

      *
      *
In certain cases, the sharedDisplayObject property might be
@@ -186,6 +191,8 @@
      *
When this IGraphicElement needs to rebuild its sequence,
      *  it notifies the IGraphicElementContainer by calling its
      *  invalidateGraphicElementSharing() method.

+     *
+     *  @param sharedDisplayObject The shared DisplayObject.
      *
      *  @return Returns true when this IGraphicElement can draw itself
      *  to the shared DisplayObject of the sequence.


Transferred from the Adobe Open Source Subversion Repository

Revision: 2971
Author:   clucier@adobe.com
Date:     2008-08-23T20:56:35.601535Z

Log Message:
-----------
Preliminary work to support Pixel Bender shaders as filters in Flex, as well as a Filter Animator, to allow for
Pixel Bender based filters (and others) to be animated during effect sequences. Checking in for safe keeping.
Reviewer: Glenn, Chet
QA: Not Yet, Minispec review/signoff pending.
Docs: NA, Minispec review/signoff pending.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/AnimateFilterInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/AnimateFilter.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1284814 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/filters/ShaderFilter.as
+++ frameworks/projects/spark/src/spark/filters/ShaderFilter.as
@@ -0,0 +1,476 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2008 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 flex.filters {
+
+import flash.display.Shader;
+import flash.display.ShaderParameter;
+import flash.display.ShaderParameterType;
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.events.IEventDispatcher;
+import flash.filters.BitmapFilter;
+import flash.filters.ShaderFilter;
+import flash.utils.ByteArray;
+import flash.utils.Proxy;
+import flash.utils.flash_proxy;
+
+import mx.filters.BaseFilter;
+import mx.filters.IBitmapFilter;
+
+use namespace flash_proxy;
+
+/**
+ *
+ */
+public dynamic class ShaderFilter extends Proxy
+    implements IBitmapFilter, IEventDispatcher
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Private storage for incoming properties, queued until
+     * shader is initialized and available.
+     */
+    private var propertyQueue:Object;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function ShaderFilter(byteCode:*=null)
+    {
+        super();
+        eventDispatcher = new EventDispatcher();
+        this.byteCode = byteCode;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  shaderInstance
+    //----------------------------------
+    /**
+     *  @private
+     *  Storage for the shaderInstance property.
+     */
+    private var _shader:Shader;
+
+    /**
+     * flash.display.Shader instance (valid once byteCode is assigned).
+     */
+    public function get shaderInstance():Shader
+    {
+        return _shader;
+    }
+
+    //----------------------------------
+    //  byteCode
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the custom filter byteCode.
+     */
+    private var _byteCode:*;
+
+    /**
+     * @private
+     */
+    public function set byteCode(byteCode:*):void
+    {
+        // Since our bytecode is sometimes reassigned by the
+        // binding infrastructure we only initialize ourselves
+        // upon the first instance.
+        if (byteCode == _byteCode)
+            return;
+
+        // Create our shader instance from the byteCode provided.
+        if (byteCode is ByteArray)
+            _shader = new Shader(byteCode);
+        else if (byteCode is Class)
+            _shader = new Shader(new byteCode());
+
+        // Push any pending properties onto the new shader instance.
+        applyQueuedProperties();
+
+        // Our new filter is ready to do its work.
+        notifyFilterChanged();
+        _byteCode = byteCode;
+    }
+
+    //----------------------------------
+    //  bottomExtension
+    //----------------------------------
+
+    private var _bottomExtension:Number = 0.0;
+
+    /**
+     *  @copy flash.filters.ShaderFilter#bottomExtension()
+     */
+    public function get bottomExtension():Number
+    {
+        return _bottomExtension;
+    }
+
+    public function set bottomExtension(value:Number):void
+    {
+        if (value == _bottomExtension)
+            return;
+
+        _bottomExtension = value;
+        notifyFilterChanged();
+    }
+
+    //----------------------------------
+    //  topExtension
+    //----------------------------------
+
+    private var _topExtension:Number = 0.0;
+
+    /**
+     *  @copy flash.filters.ShaderFilter#topExtension()
+     */
+    public function get topExtension():Number
+    {
+        return _topExtension;
+    }
+
+    public function set topExtension(value:Number):void
+    {
+        if (value == _topExtension)
+            return
+
+        _topExtension = value;
+        notifyFilterChanged();
+    }
+
+    //----------------------------------
+    //  leftExtension
+    //----------------------------------
+
+    private var _leftExtension:Number = 0.0;
+
+    /**
+     *  @copy flash.filters.ShaderFilter#leftExtension()
+     */
+    public function get leftExtension():Number
+    {
+        return _leftExtension;
+    }
+
+    public function set leftExtension(value:Number):void
+    {
+        if (value == _leftExtension)
+            return;
+
+        _leftExtension = value;
+        notifyFilterChanged();
+    }
+
+    //----------------------------------
+    //  rightExtension
+    //----------------------------------
+
+    private var _rightExtension:Number = 0.0;
+
+    /**
+     *  @copy flash.filters.ShaderFilter#rightExtension()
+     */
+    public function get rightExtension():Number
+    {
+        return _rightExtension;
+    }
+
+    public function set rightExtension(value:Number):void
+    {
+        if (value == _rightExtension)
+            return;
+
+        _rightExtension = value;
+        notifyFilterChanged();
+    }
+
+    //----------------------------------
+    //  precisionHint
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    private var _precisionHint:String;
+
+    /**
+     * The precision of math operations performed by the shader.
+     * The set of possible values for the precisionHint property is defined
+     * by the constants in the ShaderPrecision class.
+     *
+     *  @see flash.display.Shader
+     */
+    public function get precisionHint():String
+    {
+        return _precisionHint;
+    }
+
+    public function set precisionHint(value:String):void
+    {
+        if (value == _precisionHint)
+            return;
+
+        _precisionHint = value;
+        notifyFilterChanged();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  ShaderData Proxy
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     * Proxies all property 'gets' to the owned shader instance.
+     */
+    override flash_proxy function getProperty(name:*):*
+    {
+        return _shader ? _shader.data[name].value : propertyQueue[name];
+    }
+
+    /**
+     * @private
+     * Proxies all property 'sets' to the owned shader instance.
+     * If the shader bytecode has yet to be set or instanced, we
+     * queue the properties for later application.
+     */
+    override flash_proxy function setProperty(name:*, value:*):void
+    {
+        if (_shader)
+        {
+            // We have a shader, push all properties to the shader
+            // instance itself.
+            applyProperty(name.toString(), value);
+            notifyFilterChanged();
+        }
+        else
+        {
+            // The shader has yet to be initialized, queue any properties,
+            // the will be applied upon creation of the shader.
+            propertyQueue = propertyQueue ? propertyQueue : new Object();
+            propertyQueue[name] = value;
+        }
+    }
+
+    /**
+     * @private
+     * Proxies method calls to our shader instance.
+     */
+    override flash_proxy function callProperty(name:*, ... args):*
+    {
+        if (_shader)
+            return _shader[name].apply(_shader, args);
+    }
+
+    /**
+     * @private
+     * Apply our queued properties once our shader instance has
+     * been constructed and initialized from its bytecode.
+     */
+    private function applyQueuedProperties():void
+    {
+        if (_shader)
+        {
+            for (var property:String in propertyQueue)
+            {
+                applyProperty(property, propertyQueue[property]);
+            }
+
+            propertyQueue = null;
+        }
+    }
+
+    /**
+     * @private
+     * Apply a single property value, provides special case conventions for
+     * targetting specific indexes of multi-dimensional shader properties.
+     *
+     * If the property identifier fits the pattern 'NAME_<S>' and the value
+     * being set is a scalar, we look for a matching multidimension shader
+     * input parameter 'NAME' and interpret the provide suffix 'S' as a named
+     * dimension as detailed below (indexForDimension).
+     *
+     * We interpret the property name 'as is' otherwise (if 'NAME' does not
+     * match an n-dimensional property, or if the value provided is a scaler).
+     */
+    private function applyProperty(property:String, value:*):void
+    {
+        var suffixPattern:RegExp = /_.$/;
+        var match:Array = property.match(suffixPattern);
+
+        if (match && match[0] && !(value is Array))
+        {
+            var suffix:String = match[0];
+            var name:String = property.substr(0, property.length - suffix.length);
+            var dimension:String = suffix.substr(suffix.length-1, 1);
+
+            var propertyInfo:ShaderParameter = _shader.data[name];
+            if (propertyInfo)
+            {
+                var index:int = indexForDimension(propertyInfo.type, dimension);
+                if (index != -1)
+                {
+                    var currentValue:Array = propertyInfo.value;
+                    currentValue[index] = value;
+                    propertyInfo.value = currentValue;
+                    return;
+                }
+            }
+        }
+
+        _shader.data[property].value = (value is Array) ? value : [value];
+    }
+
+    /**
+     * @private
+     * Given a property of the form property_<S> where S is a single
+     * character representing a named dimension of a multi-dimensional
+     * parameter, return the associated numeric index.
+     */
+    private function indexForDimension(type:String, dimension:String):int
+    {
+       var index:int = 0;
+
+       if (type == ShaderParameterType.MATRIX2X2 ||
+           type == ShaderParameterType.MATRIX3X3 ||
+           type == ShaderParameterType.MATRIX4X4)
+       {
+           // "abcdefghijklmnop" convenience access to:
+           //   MATRIX 2x2, MATRIX3x3, or MATRIX4x4
+           index = dimension.charCodeAt(0) - 0x61; // 'a'
+       }
+       else if (Number(type.charAt(type.length - 1)) > 0)
+       {
+           // "rgba", "xyzw", or "stpq" convenience access to:
+           //  BOOL2, BOOL3, BOOL4, FLOAT2, FLOAT3, FLOAT4,
+           //  INT2, INT3, or INT4
+           index = "rgba".indexOf(dimension);
+           index = (index == -1) ? "xyzw".indexOf(dimension) : index;
+           index = (index == -1) ? "stpq".indexOf(dimension) : index;
+       }
+
+       return index;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  IBitmapFilter/BaseFilter
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     * Notify of a change to our filter, so that filter stack is ultimately
+     * re-applied by the framework.
+     */
+    public function notifyFilterChanged():void
+    {
+        dispatchEvent(new Event(BaseFilter.CHANGE));
+    }
+
+    /**
+     * @private
+     * Returns a native flash.filters.ShaderFilter instance suitable
+     * for application in a DisplayObject filter stack.
+     */
+    public function clone():BitmapFilter
+    {
+        var instance:flash.filters.ShaderFilter;
+        if (_shader)
+        {
+            _shader.precisionHint = _precisionHint ?
+            	_precisionHint : _shader.precisionHint;
+            instance = new flash.filters.ShaderFilter(_shader);
+            instance.bottomExtension = _bottomExtension;
+            instance.topExtension = _topExtension;
+            instance.leftExtension = _leftExtension;
+            instance.rightExtension = _rightExtension;
+        }
+
+        return instance;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  IEventDispatcher
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     */
+    private var eventDispatcher:EventDispatcher;
+
+    /**
+     * @private
+     */
+    public function addEventListener(type:String, listener:Function, useCapture:Boolean = false,
+            priority:int = 0, useWeakReference:Boolean = false):void
+    {
+        eventDispatcher.addEventListener(type, listener, useCapture, priority, useWeakReference);
+    }
+
+    /**
+     * @private
+     */
+    public function dispatchEvent(event:Event):Boolean
+    {
+        return eventDispatcher.dispatchEvent(event);
+    }
+
+    /**
+     * @private
+     */
+    public function hasEventListener(type:String):Boolean
+    {
+        return eventDispatcher.hasEventListener(type);
+    }
+
+    /**
+     * @private
+     */
+    public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
+    {
+        eventDispatcher.removeEventListener(type, listener, useCapture);
+    }
+
+    /**
+     * @private
+     */
+    public function willTrigger(type:String):Boolean
+    {
+        return eventDispatcher.willTrigger(type);
+    }
+
+}
+
+}