Repository: flex-asjs
Updated Branches:
  refs/heads/svg-rename bc0469227 -> 6a28675d9


Renamed GRaphicsContainer
Cleaned up some CSS utils


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6a28675d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6a28675d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6a28675d

Branch: refs/heads/svg-rename
Commit: 6a28675d976489c84798762d47fe30a2e1348eef
Parents: bc04692
Author: Harbs <ha...@in-tools.com>
Authored: Fri Jul 22 14:46:04 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Fri Jul 22 14:46:04 2016 +0300

----------------------------------------------------------------------
 .../apache/flex/charts/beads/AxisBaseBead.as    |   7 +-
 .../flex/charts/optimized/SVGBoxItemRenderer.as |   4 +-
 .../flex/charts/optimized/SVGChartAxisGroup.as  |   6 +-
 .../flex/charts/optimized/SVGChartDataGroup.as  |   4 +-
 .../optimized/SVGLineSegmentItemRenderer.as     |   6 +-
 .../charts/optimized/SVGWedgeItemRenderer.as    |   6 +-
 .../projects/Core/src/main/flex/CoreClasses.as  |   1 +
 .../main/flex/org/apache/flex/utils/CSSUtils.as | 145 ++++----
 .../flex/org/apache/flex/utils/StringPadder.as  |  69 ++++
 .../org/apache/flex/createjs/core/UIBase.as     |  12 +-
 .../Graphics/src/main/flex/GraphicsClasses.as   |   2 +-
 .../apache/flex/graphics/ICompoundGraphic.as    |  28 ++
 .../flex/org/apache/flex/graphics/SolidColor.as |   8 +-
 .../apache/flex/graphics/SolidColorStroke.as    |   8 +-
 .../flex/org/apache/flex/svg/CompoundGraphic.as | 357 +++++++++++++++++++
 .../org/apache/flex/svg/GraphicsContainer.as    | 318 -----------------
 .../src/main/resources/basic-manifest.xml       |   2 +-
 .../apache/flex/html/beads/DataGridLinesBead.as |   6 +-
 .../html/supportClasses/GraphicsItemRenderer.as |   4 +-
 .../FlexJSTest_SVG/src/GraphicsView.mxml        |   8 +-
 20 files changed, 565 insertions(+), 436 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as
 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as
index b141c84..3ce75ce 100644
--- 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as
+++ 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/AxisBaseBead.as
@@ -1,3 +1,4 @@
+
 
////////////////////////////////////////////////////////////////////////////////
 //
 //  Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,7 +23,7 @@ package org.apache.flex.charts.beads
        import org.apache.flex.charts.core.IAxisGroup;
        import org.apache.flex.core.IStrand;
        import org.apache.flex.core.UIBase;
-       import org.apache.flex.svg.GraphicsContainer;
+       import org.apache.flex.svg.CompoundGraphic;
        import org.apache.flex.graphics.IFill;
        import org.apache.flex.graphics.IStroke;
        import org.apache.flex.graphics.SolidColor;
@@ -67,7 +68,7 @@ package org.apache.flex.charts.beads
                }
                
                private var _strand:IStrand;
-               private var wrapper:GraphicsContainer;
+               private var wrapper:CompoundGraphic;
                private var _axisGroup:IAxisGroup;
        
                private var _placement:String = "unset";
@@ -160,7 +161,7 @@ package org.apache.flex.charts.beads
                {
                        _axisGroup = value;
                        
-                       wrapper = new GraphicsContainer();
+                       wrapper = new CompoundGraphic();
                        UIBase(_axisGroup).addElement(wrapper);
                        wrapper.x = 0;
                        wrapper.y = 0;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
index 20f4c46..ed0433f 100644
--- 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
+++ 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGBoxItemRenderer.as
@@ -20,7 +20,7 @@ package org.apache.flex.charts.optimized
 {
        import org.apache.flex.charts.core.IChartItemRenderer;
        import org.apache.flex.charts.core.IChartSeries;
-       import org.apache.flex.svg.GraphicsContainer;
+       import org.apache.flex.svg.CompoundGraphic;
        import org.apache.flex.graphics.IFill;
        import org.apache.flex.graphics.IStroke;
        import org.apache.flex.graphics.SolidColor;
@@ -30,7 +30,7 @@ package org.apache.flex.charts.optimized
        
        /**
         *  The SVGBoxItemRenderer draws its graphics directly into a 
SVGChartDataGroup
-        *  (GraphicsContainer).
+        *  (CompoundGraphic).
         *
         *  @langversion 3.0
         *  @playerversion Flash 10.2

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as
 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as
index e9e434b..bff0849 100644
--- 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as
+++ 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartAxisGroup.as
@@ -19,12 +19,12 @@
 package org.apache.flex.charts.optimized
 {
        import org.apache.flex.charts.core.IAxisGroup;
-       import org.apache.flex.svg.GraphicsContainer;
+       import org.apache.flex.svg.CompoundGraphic;
        import org.apache.flex.graphics.IFill;
        import org.apache.flex.graphics.IStroke;
        
        /**
-        * The SVGChartAxisGroup provides a GraphicsContainer whose drawing 
functions
+        * The SVGChartAxisGroup provides a CompoundGraphic whose drawing 
functions
         * can be used to display a chart's axis graphics without resorting to 
the
         * creation of extra objects.
         *  
@@ -33,7 +33,7 @@ package org.apache.flex.charts.optimized
         *  @playerversion AIR 2.6
         *  @productversion FlexJS 0.0
         */
-       public class SVGChartAxisGroup extends GraphicsContainer implements 
IAxisGroup
+       public class SVGChartAxisGroup extends CompoundGraphic implements 
IAxisGroup
        {
                /**
                 * Constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
index 0f3a28d..bc2fbe3 100644
--- 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
+++ 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGChartDataGroup.as
@@ -26,7 +26,7 @@ package org.apache.flex.charts.optimized
        import org.apache.flex.core.IItemRendererParent;
        import org.apache.flex.core.IStrand;
        import org.apache.flex.core.UIBase;
-       import org.apache.flex.svg.GraphicsContainer;
+       import org.apache.flex.svg.CompoundGraphic;
        import org.apache.flex.events.Event;
        import org.apache.flex.geom.Point;
        
@@ -40,7 +40,7 @@ package org.apache.flex.charts.optimized
         *  @playerversion AIR 2.6
         *  @productversion FlexJS 0.0
         */
-       public class SVGChartDataGroup extends GraphicsContainer implements 
IItemRendererParent, IContentView, IChartDataGroup
+       public class SVGChartDataGroup extends CompoundGraphic implements 
IItemRendererParent, IContentView, IChartDataGroup
        {
                /**
                 *  constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
index 3300a76..d271474 100644
--- 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
+++ 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGLineSegmentItemRenderer.as
@@ -19,7 +19,7 @@
 package org.apache.flex.charts.optimized
 {
        import org.apache.flex.charts.core.IChartSeries;
-       import org.apache.flex.svg.GraphicsContainer;
+       import org.apache.flex.svg.CompoundGraphic;
        import org.apache.flex.graphics.IStroke;
        import org.apache.flex.svg.Path;
        import org.apache.flex.graphics.SolidColorStroke;
@@ -28,7 +28,7 @@ package org.apache.flex.charts.optimized
        
        /**
         *  The SVGLineSegmentItemRenderer draws its graphics directly into a 
SVGChartDataGroup (a
-        *  GraphicsContainer).
+        *  CompoundGraphic).
         *
         *  @langversion 3.0
         *  @playerversion Flash 10.2
@@ -177,7 +177,7 @@ package org.apache.flex.charts.optimized
                {                       
                        if (points != null)
                        {
-                               var graphicsContainer:GraphicsContainer = 
this.itemRendererParent as GraphicsContainer;
+                               var graphicsContainer:CompoundGraphic = 
this.itemRendererParent as CompoundGraphic;
                                
                                if (stroke == null) {
                                        var solidColorStroke:SolidColorStroke = 
new SolidColorStroke();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as
 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as
index 0c08401..e61fd7d 100644
--- 
a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as
+++ 
b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/optimized/SVGWedgeItemRenderer.as
@@ -19,7 +19,7 @@
 package org.apache.flex.charts.optimized
 {
        import org.apache.flex.charts.core.IChartSeries;
-       import org.apache.flex.svg.GraphicsContainer;
+       import org.apache.flex.svg.CompoundGraphic;
        import org.apache.flex.graphics.IFill;
        import org.apache.flex.graphics.IStroke;
        import org.apache.flex.svg.Path;
@@ -28,7 +28,7 @@ package org.apache.flex.charts.optimized
        
        /**
         *  The SVGWedgeItemRenderer draws its graphics directly into a 
SVGChartDataGroup
-        *  (a GraphicsContainer).
+        *  (a CompoundGraphic).
         *
         *  @langversion 3.0
         *  @playerversion Flash 10.2
@@ -237,7 +237,7 @@ package org.apache.flex.charts.optimized
                                                                  
radius:Number, yRadius:Number = NaN,
                                                                  
continueFlag:Boolean = false):void
                {                       
-                       var graphicsContainer:GraphicsContainer = 
this.itemRendererParent as GraphicsContainer;
+                       var graphicsContainer:CompoundGraphic = 
this.itemRendererParent as CompoundGraphic;
                        
                        var x1:Number = x + radius * Math.cos(startAngle);
                        var y1:Number = y + radius * Math.sin(startAngle);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/CoreClasses.as 
b/frameworks/projects/Core/src/main/flex/CoreClasses.as
index 94d42af..a1cfe9c 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -130,6 +130,7 @@ internal class CoreClasses
 }
        import org.apache.flex.utils.BrowserUtils; BrowserUtils;
        import org.apache.flex.utils.Endian; Endian;
+    import org.apache.flex.utils.StringPadder; StringPadder;
        import org.apache.flex.utils.StringTrimmer; StringTrimmer;
        import org.apache.flex.utils.StringUtil; StringUtil;
        import org.apache.flex.utils.Timer; Timer;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as
index 35e6314..22c7efa 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as
@@ -38,6 +38,10 @@ package org.apache.flex.utils
                        throw new Error("CSSUtils should not be instantiated.");
                }
                
+        public static function attributeFromColor(value:uint):String
+        {
+            return "#" + StringPadder.pad(value.toString(16),"0",6);
+        }
         /**
          *  Converts a String to number.
          *
@@ -142,11 +146,11 @@ package org.apache.flex.utils
                 return colorMap[stringValue];
             return uint(stringValue);
         }
-        
+
         /**
-         *  Computes paddingLeft or marginLeft.
+         *  Computes paddingTop or marginTop.
          *
-         *  @param value The value of padding-left or margin-left. 
+         *  @param value The value of padding-top or margin-top. 
          *  @param values The value of padding or margin. 
          *  @param reference A Number that will be used to convert 
percentages. 
          *
@@ -158,30 +162,9 @@ package org.apache.flex.utils
          *  @productversion FlexJS 0.0
          *  @flexjsignorecoercion String
          */
-        public static function getLeftValue(value:Object, values:Object, 
reference:Number = NaN):Number
+        public static function getTopValue(value:Object, values:Object, 
reference:Number = NaN):Number
         {
-            if (value is Number)
-                return value as Number;
-
-            if (values is Number)
-                return values as Number;
-            
-            if (value != null)
-                return toNumber(value as String, reference);
-            if (values == null)
-                return 0;
-            if (values is Array)
-            {
-                var arr:Array = values as Array;
-                var n:int = arr.length;
-                // shouldn't be n == 1. values would not be an array
-                var index:int = n < 3 ? 1 : 3;
-                value = arr[index];
-                if (value is String)
-                  return toNumber(value as String, reference);
-                return value as Number;
-            }
-            return toNumber(values as String, reference);
+            return getSideValue(value, values, 0, reference);
         }
         
         /**
@@ -201,31 +184,13 @@ package org.apache.flex.utils
          */
         public static function getRightValue(value:Object, values:Object, 
reference:Number = NaN):Number
         {
-            if (value is Number)
-                return value as Number;
-
-            if (values is Number)
-                return values as Number;
-            
-            if (value != null)
-                return toNumber(value as String, reference);
-            if (values == null)
-                return 0;
-            if (values is Array)
-            {
-                var arr:Array = values as Array;
-                value = arr[1];
-                if (value is String)
-                    return toNumber(value as String, reference);
-                return value as Number;
-            }
-            return toNumber(values as String, reference);
+            return getSideValue(value, values, 1, reference);
         }
         
         /**
-         *  Computes paddingTop or marginTop.
+         *  Computes paddingBottom or marginBottom.
          *
-         *  @param value The value of padding-top or margin-top. 
+         *  @param value The value of padding-bottom or margin-bottom. 
          *  @param values The value of padding or margin. 
          *  @param reference A Number that will be used to convert 
percentages. 
          *
@@ -237,33 +202,15 @@ package org.apache.flex.utils
          *  @productversion FlexJS 0.0
          *  @flexjsignorecoercion String
          */
-        public static function getTopValue(value:Object, values:Object, 
reference:Number = NaN):Number
+        public static function getBottomValue(value:Object, values:Object, 
reference:Number = NaN):Number
         {
-            if (value is Number)
-                return value as Number;
-            
-            if (values is Number)
-                return values as Number;
-            
-            if (value != null)
-                return toNumber(value as String, reference);
-            if (values == null)
-                return 0;
-            if (values is Array)
-            {
-                var arr:Array = values as Array;
-                value = arr[0];
-                if (value is String)
-                    return toNumber(value as String, reference);
-                return value as Number;
-            }
-            return toNumber(values as String, reference);
+            return getSideValue(value, values, 2, reference);
         }
-        
+
         /**
-         *  Computes paddingBottom or marginBottom.
+         *  Computes paddingLeft or marginLeft.
          *
-         *  @param value The value of padding-bottom or margin-bottom. 
+         *  @param value The value of padding-left or margin-left. 
          *  @param values The value of padding or margin. 
          *  @param reference A Number that will be used to convert 
percentages. 
          *
@@ -275,7 +222,28 @@ package org.apache.flex.utils
          *  @productversion FlexJS 0.0
          *  @flexjsignorecoercion String
          */
-        public static function getBottomValue(value:Object, values:Object, 
reference:Number = NaN):Number
+        public static function getLeftValue(value:Object, values:Object, 
reference:Number = NaN):Number
+        {
+            return getSideValue(value, values, 3, reference);
+        }
+
+        /**
+         *  Computes padding or margin.
+         *
+         *  @param value The value of padding or margin.
+         *  @param values The value of padding or margin. 
+         *  @param side Which side we want to get. 0 = top, 1 = right, 2 = 
bottom, 3 = left
+         *  @param reference A Number that will be used to convert 
percentages. 
+         *
+         *  @return Number. 
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         *  @flexjsignorecoercion String
+         */
+        public static function getSideValue(value:Object, values:Object, 
side:int, reference:Number = NaN):Number
         {
             if (value is Number)
                 return value as Number;
@@ -289,17 +257,42 @@ package org.apache.flex.utils
                 return 0;
             if (values is Array)
             {
-                var arr:Array = values as Array;
-                var n:int = arr.length;
-                // shouldn't be n == 1. values would not be an array
-                var index:int = n == 2 ? 0 : 2;
-                value = arr[index];
+                value = getArrayValue(values as Array,side);
                 if (value is String)
                     return toNumber(value as String, reference);
                 return value as Number;
             }
             return toNumber(values as String, reference);
         }
+
+        /**
+         *  @private
+         *  
+         *  side should be an int 0 = top, 1 = right, 2 = bottom, 3 = left
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        private static function getArrayValue(arr:Array,side:int):Object
+        {
+            var n:int = arr.length;
+            switch (side)
+            {
+                case 2:
+                    side = n == 2 ? 0 : 2;
+                    break;
+                case 3:
+                    side = n < 3 ? 1 : 3;
+                    break;
+                default:
+                    //do nothing for 0 and 1
+                    break;
+            }
+            return arr[side];
+        }
+
         
         /**
          *  The map of color names to uints.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringPadder.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringPadder.as 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringPadder.as
new file mode 100644
index 0000000..e382df5
--- /dev/null
+++ 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringPadder.as
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+//
+//      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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.utils
+{
+       /**
+        *  The StringPadder utility class is an all-static class with methods 
for
+        *  working with String objects.
+        *  You do not create instances of StringPadder;
+        *  instead you call methods such as 
+        *  the <code>StringPadder.pad()</code> method.  
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 9
+        *  @playerversion AIR 1.1
+        *  @productversion Flex 3
+        *  @productversion FlexJS 0.0
+        */
+       public class StringPadder
+       {
+
+               /**
+                *  Pads a string with an arbitrary string.
+                *
+                *  @param str The string to be padded.
+                *
+                *  @param padChar The character used to pad the string. This 
should be a single character.
+                *
+                *  @param size The size of the padded string.
+                *
+                *  @param padRight Which side to add the padding on. By 
default it's added to the left.
+                *
+                *  @return The padded string.
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10
+                *  @playerversion AIR 1.5
+                *  @productversion Flex 4.1
+                *  @productversion FlexJS 0.0
+                */
+               public static function 
pad(str:String,padChar:String,size:int,padRight:Boolean=false):String
+               {
+                       str = str ? str : "";
+
+                       size+=1;
+                       size -= str.length;
+                       var p:String = new Array(size).join(padChar);
+                       if(padRight)
+                               return str + p;
+                       else
+                               return p + str;
+               }
+       }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
 
b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
index da5fc63..10c85c8 100644
--- 
a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
+++ 
b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
@@ -33,6 +33,7 @@ package org.apache.flex.createjs.core
        import org.apache.flex.core.ValuesManager;
        import org.apache.flex.events.Event;
        import org.apache.flex.events.IEventDispatcher;
+       import org.apache.flex.utils.CSSUtils;
        
     COMPILE::JS
     {
@@ -707,11 +708,12 @@ package org.apache.flex.createjs.core
                        // ideally, for CreateJS, we convert the color value 
and alpha into the
                        // format: "rgba(red,green,blue,alpha)" such as 
"rgba(255,0,0,1.0)"
                        // but for now we'll make it easy
-                       var color:String = Number(value).toString(16);
-                       if (color.length == 1) color = '00' + color;
-                       if (color.length == 2) color = '00' + color;
-                       if (color.length == 4) color = '00' + color;
-                       return "#"+color;
+                       if(alpha < 1)
+                       {
+                               // we should be doing something else...
+                               return CSSUtils.attributeFromColor(value);
+                       }
+                       return CSSUtils.attributeFromColor(value);
                }
 
        }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as 
b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
index 11d729c..1f71851 100644
--- a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
+++ b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
@@ -36,7 +36,7 @@ internal class GraphicsClasses
        import org.apache.flex.graphics.SolidColor; SolidColor;
        import org.apache.flex.graphics.SolidColorStroke; SolidColorStroke;
        import org.apache.flex.svg.Text; Text;
-       import org.apache.flex.svg.GraphicsContainer; GraphicsContainer;
+       import org.apache.flex.svg.CompoundGraphic; CompoundGraphic;
        import org.apache.flex.svg.LinearGradient; LinearGradient;
 }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ICompoundGraphic.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ICompoundGraphic.as
 
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ICompoundGraphic.as
new file mode 100644
index 0000000..95a7dcd
--- /dev/null
+++ 
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ICompoundGraphic.as
@@ -0,0 +1,28 @@
+/**
+ * Licensed 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
+ *
+ *     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.
+ */
+
+package org.apache.flex.graphics
+{
+       public interface ICompoundGraphic extends IGraphicShape
+       {
+               function clear():void;
+               function drawRect(x:Number, y:Number, width:Number, 
height:Number):void;
+               function drawEllipse(x:Number, y:Number, width:Number, 
height:Number):void;
+               function drawCircle(x:Number, y:Number, radius:Number):void;
+               function drawPath(data:String):void;
+               function drawText(value:String, x:Number, y:Number):Object;
+               function get textColor():IFill;
+               function set textColor(value:IFill):void;
+       }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as
 
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as
index cde2d30..e3a2888 100644
--- 
a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as
+++ 
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColor.as
@@ -14,6 +14,8 @@
 
 package org.apache.flex.graphics
 {
+       import org.apache.flex.utils.CSSUtils;
+
     COMPILE::SWF
     {
         import flash.geom.Point;
@@ -126,11 +128,7 @@ package org.apache.flex.graphics
         COMPILE::JS
         public function addFillAttrib(value:IGraphicShape):String
         {
-            var color:String = Number(this.color).toString(16);
-            if (color.length == 1) color = '00' + color;
-            if (color.length == 2) color = '00' + color;
-            if (color.length == 4) color = '00' + color;
-            return 'fill:#' + String(color) + ';fill-opacity:' + String(alpha);
+            return 'fill:' + CSSUtils.attributeFromColor(color) + 
';fill-opacity:' + String(alpha);
         }
        }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as
 
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as
index 9a5e56b..6cb6963 100644
--- 
a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as
+++ 
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/SolidColorStroke.as
@@ -14,6 +14,8 @@
 
 package org.apache.flex.graphics
 {
+       import org.apache.flex.utils.CSSUtils;
+
     COMPILE::SWF
     {
         import flash.display.CapsStyle;
@@ -118,11 +120,7 @@ package org.apache.flex.graphics
         COMPILE::JS
         public function addStrokeAttrib(value:IGraphicShape):String
         {
-            var strokeColor:String = Number(color).toString(16);
-            if (strokeColor.length == 1) strokeColor = '00' + strokeColor;
-            if (strokeColor.length == 2) strokeColor = '00' + strokeColor;
-            if (strokeColor.length == 4) strokeColor = '00' + strokeColor;
-            return 'stroke:#' + String(strokeColor) + ';stroke-width:' +
+            return 'stroke:' + CSSUtils.attributeFromColor(color) + 
';stroke-width:' +
                 String(weight) + ';stroke-opacity:' + String(alpha);
         };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/CompoundGraphic.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/CompoundGraphic.as
 
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/CompoundGraphic.as
new file mode 100644
index 0000000..02f3aa5
--- /dev/null
+++ 
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/CompoundGraphic.as
@@ -0,0 +1,357 @@
+/**
+ * Licensed 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
+ *
+ *     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.
+ */
+
+package org.apache.flex.svg
+{
+       import org.apache.flex.graphics.ICompoundGraphic;
+       import org.apache.flex.graphics.IFill;
+       import org.apache.flex.graphics.SolidColor;
+
+    COMPILE::SWF
+    {
+        import flash.display.GraphicsPath;
+        import flash.display.Shape;
+        import flash.display.Sprite;
+        import flash.geom.Point;
+        import flash.geom.Rectangle;
+        import flash.text.TextFieldType;
+
+        import org.apache.flex.core.CSSTextField;
+        import org.apache.flex.graphics.utils.PathHelper;
+    }
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+
+       /**
+        * CompoundGraphic is a surface on which you can
+        * draw various graphic elements such as Rect, Circle,
+        * Ellipse, Path etc.
+        * Use this class if you want to draw multiple graphic
+        * shapes on a single container.
+        *
+        */
+       public class CompoundGraphic extends GraphicShape implements 
ICompoundGraphic
+       {
+        private var _textColor:IFill;
+
+        public function get textColor():IFill
+        {
+            return _textColor;
+        }
+        /**
+         *  The color of the text.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion FlexJS 0.0
+         */
+        public function set textColor(value:IFill):void
+        {
+            _textColor = value;
+        }
+
+               /**
+                *  Removes all of the drawn elements of the container.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0.3
+                */
+               public function removeAllElements():void
+               {
+            clear();
+        }
+        
+        /**
+         *  Clears all of the drawn path data.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.7.0
+         */
+        public function clear():void
+        {
+            COMPILE::SWF
+            {
+                graphics.clear();
+            }
+            COMPILE::JS
+            {
+                var svg:HTMLElement = element;
+                while (svg.lastChild) {
+                    svg.removeChild(svg.lastChild);
+                }
+            }
+        }
+
+               /**
+                *  Draw the rectangle.
+                *  @param x The x position of the top-left corner of the 
rectangle.
+                *  @param y The y position of the top-left corner.
+                *  @param width The width of the rectangle.
+                *  @param height The height of the rectangle.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0.3
+         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+                */
+               public function drawRect(x:Number, y:Number, width:Number, 
height:Number):void
+               {
+            COMPILE::SWF
+            {
+                applyStroke();
+                beginFill(new Rectangle(x, y, width, height), new Point(x,y) );
+                graphics.drawRect(x, y, width, height);
+                endFill();
+            }
+            COMPILE::JS
+            {
+                var style:String = getStyleStr();
+                var rect:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'rect') as 
WrappedHTMLElement;
+                rect.flexjs_wrapper = this;
+                rect.style.left = x;
+                rect.style.top = y;
+                rect.setAttribute('style', style);
+                rect.setAttribute('x', String(x) + 'px');
+                rect.setAttribute('y', String(y) + 'px');
+                rect.setAttribute('width', String(width) + 'px');
+                rect.setAttribute('height', String(height) + 'px');
+                element.appendChild(rect);
+            }
+               }
+
+               /**
+                *  Draw the ellipse.
+                *  @param x The x position of the top-left corner of the 
bounding box of the ellipse.
+                *  @param y The y position of the top-left corner of the 
bounding box of the ellipse.
+                *  @param width The width of the ellipse.
+                *  @param height The height of the ellipse.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0.3
+         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+                */
+               public function drawEllipse(x:Number, y:Number, width:Number, 
height:Number):void
+               {
+            COMPILE::SWF
+            {
+                applyStroke();
+                beginFill(new Rectangle(x,y,width,height), new Point(x,y));
+                graphics.drawEllipse(x,y,width,height);
+                endFill();
+            }
+            COMPILE::JS
+            {
+                var style:String = getStyleStr();
+                var ellipse:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as 
WrappedHTMLElement;
+                ellipse.flexjs_wrapper = this;
+                ellipse.style.left = x;
+                ellipse.style.top = y;
+                ellipse.setAttribute('style', style);
+                ellipse.setAttribute('cx', String(x + width / 2));
+                ellipse.setAttribute('cy', String(y + height / 2));
+                ellipse.setAttribute('rx', String(width / 2));
+                ellipse.setAttribute('ry', String(height / 2));
+                element.appendChild(ellipse);
+            }
+               }
+
+               /**
+                *  Draw the circle.
+                *  @param x The x location of the center of the circle
+                *  @param y The y location of the center of the circle.
+                *  @param radius The radius of the circle.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+                */
+               public function drawCircle(x:Number, y:Number, 
radius:Number):void
+               {
+            COMPILE::SWF
+            {
+                applyStroke();
+                beginFill(new Rectangle(x,y,radius*2, radius*2),new 
Point(x-radius,y-radius));
+                graphics.drawCircle(x,y,radius);
+                endFill();
+            }
+            COMPILE::JS
+            {
+                var style:String = getStyleStr();
+                var circle:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as 
WrappedHTMLElement;
+                circle.flexjs_wrapper = this;
+                circle.style.left = x;
+                circle.style.top = y;
+                circle.setAttribute('style', style);
+                circle.setAttribute('cx', String(x));
+                circle.setAttribute('cy', String(y));
+                circle.setAttribute('rx', String(radius));
+                circle.setAttribute('ry', String(radius));
+                element.appendChild(circle);
+
+            }
+               }
+
+               /**
+                *  Draw the path.
+                *  @param data A string containing a compact represention of 
the path segments.
+                *  The value is a space-delimited string describing each path 
segment. Each
+                *  segment entry has a single character which denotes the 
segment type and
+                *  two or more segment parameters.
+                *
+                *  If the segment command is upper-case, the parameters are 
absolute values.
+                *  If the segment command is lower-case, the parameters are 
relative values.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+                */
+               public function drawPath(data:String):void
+               {
+            COMPILE::SWF
+            {
+                applyStroke();
+                var bounds:Rectangle = PathHelper.getBounds(data);
+                beginFill(bounds,bounds.topLeft);
+                var graphicsPath:GraphicsPath = PathHelper.getSegments(data);
+                graphics.drawPath(graphicsPath.commands, graphicsPath.data);
+                endFill();
+            }
+            COMPILE::JS
+            {
+                var style:String = getStyleStr();
+                var path:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'path') as 
WrappedHTMLElement;
+                path.flexjs_wrapper = this;
+                path.style.left = 0;
+                path.style.top = 0;
+                path.setAttribute('style', style);
+                path.setAttribute('d', data);
+                element.appendChild(path);
+            }
+               }
+
+               public function drawLine():void
+               {
+
+               }
+
+               public function drawPolygon():void
+               {
+
+               }
+
+               /**
+                *  Draw a string of characters.
+                *  @param value The string to draw.
+                *  @param x The x location of the center of the circle
+                *  @param y The y location of the center of the circle.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         *  @flexjsignorecoercion Text
+         *  @flexjsignorecoercion Node
+                */
+               public function drawText(value:String, x:Number, 
y:Number):Object
+               {
+            COMPILE::SWF
+            {
+                var textField:CSSTextField = new CSSTextField();
+                addChild(textField);
+
+                textField.selectable = false;
+                textField.type = TextFieldType.DYNAMIC;
+                textField.mouseEnabled = false;
+                textField.autoSize = "left";
+                textField.text = value;
+
+                var color:SolidColor = textColor as SolidColor;
+                if (color) {
+                    textField.textColor = color.color;
+                    textField.alpha = color.alpha;
+                }
+
+                textField.x = x;
+                textField.y = y + textField.textHeight/4;
+
+                return textField;
+
+            }
+            COMPILE::JS
+            {
+                var style:String = getTxtStyleStr();
+                var text:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'text') as 
WrappedHTMLElement;
+                text.flexjs_wrapper = this;
+                text.style.left = x;
+                text.style.top = y;
+                text.setAttribute('style', style);
+                text.setAttribute('x', String(x) + 'px');
+                text.setAttribute('y', String(y + 15) + 'px');
+                var textNode:Text = document.createTextNode(value) as Text;
+                text.appendChild(textNode as Node);
+                element.appendChild(text);
+                return text;
+            }
+               }
+
+                /**
+         * @return {string} The style attribute.
+         */
+        COMPILE::JS
+        public function getTxtStyleStr():String
+        {
+            var fillStr:String;
+            if (textColor)
+            {
+                fillStr = textColor.addFillAttrib(this);
+            }
+            else
+            {
+                fillStr = 'fill:none';
+            }
+            return fillStr;
+
+            // Not supporting text strokes for now.
+/*
+            var strokeStr:String;
+            if (stroke)
+            {
+                strokeStr = stroke.addStrokeAttrib(this);
+            }
+            else
+            {
+                strokeStr = 'stroke:none';
+            }
+            return fillStr + ';' + strokeStr;
+*/
+
+        }
+
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicsContainer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicsContainer.as
 
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicsContainer.as
deleted file mode 100644
index 09db263..0000000
--- 
a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicsContainer.as
+++ /dev/null
@@ -1,318 +0,0 @@
-/**
- * Licensed 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
- *
- *     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.
- */
-
-package org.apache.flex.svg
-{
-       import org.apache.flex.graphics.SolidColor;
-       import org.apache.flex.graphics.SolidColorStroke;
-
-    COMPILE::SWF
-    {
-        import flash.display.GraphicsPath;
-        import flash.display.Shape;
-        import flash.display.Sprite;
-        import flash.geom.Point;
-        import flash.geom.Rectangle;
-        import flash.text.TextFieldType;
-
-        import org.apache.flex.core.CSSTextField;
-        import org.apache.flex.graphics.utils.PathHelper;
-    }
-    COMPILE::JS
-    {
-        import org.apache.flex.core.WrappedHTMLElement;
-    }
-
-       /**
-        * GraphicsContainer is a surface on which you can
-        * draw various graphic elements such as Rect, Circle,
-        * Ellipse, Path etc.
-        * Use this class if you want to draw multiple graphic
-        * shapes on a single container.
-        *
-        */
-       public class GraphicsContainer extends GraphicShape
-       {
-               /**
-                *  Removes all of the drawn elements of the container.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0.3
-                */
-               public function removeAllElements():void
-               {
-            clear();
-        }
-        
-        /**
-         *  Clears all of the drawn path data.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.7.0
-         */
-        public function clear():void
-        {
-            COMPILE::SWF
-            {
-                graphics.clear();
-            }
-            COMPILE::JS
-            {
-                var svg:HTMLElement = element;
-                while (svg.lastChild) {
-                    svg.removeChild(svg.lastChild);
-                }
-            }
-        }
-
-               /**
-                *  Draw the rectangle.
-                *  @param x The x position of the top-left corner of the 
rectangle.
-                *  @param y The y position of the top-left corner.
-                *  @param width The width of the rectangle.
-                *  @param height The height of the rectangle.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0.3
-         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-                */
-               public function drawRect(x:Number, y:Number, width:Number, 
height:Number):void
-               {
-            COMPILE::SWF
-            {
-                applyStroke();
-                beginFill(new Rectangle(x, y, width, height), new Point(x,y) );
-                graphics.drawRect(x, y, width, height);
-                endFill();
-            }
-            COMPILE::JS
-            {
-                var style:String = getStyleStr();
-                var rect:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'rect') as 
WrappedHTMLElement;
-                rect.flexjs_wrapper = this;
-                rect.style.left = x;
-                rect.style.top = y;
-                rect.setAttribute('style', style);
-                rect.setAttribute('x', String(x) + 'px');
-                rect.setAttribute('y', String(y) + 'px');
-                rect.setAttribute('width', String(width) + 'px');
-                rect.setAttribute('height', String(height) + 'px');
-                element.appendChild(rect);
-            }
-               }
-
-        COMPILE::SWF
-               public function createRect(x:Number, y:Number, width:Number, 
height:Number):void
-               {
-                       var color:uint = (fill as SolidColor).color;
-                       var alpha:uint = (fill as SolidColor).alpha;
-
-                       var shape:Sprite = new Sprite();
-                       shape.graphics.beginFill(color,alpha);
-                       shape.graphics.drawRect(0, 0, width, height);
-                       shape.graphics.endFill();
-                       shape.x = x;
-                       shape.y = y;
-                       addChild(shape);
-               }
-
-               /**
-                *  Draw the ellipse.
-                *  @param x The x position of the top-left corner of the 
bounding box of the ellipse.
-                *  @param y The y position of the top-left corner of the 
bounding box of the ellipse.
-                *  @param width The width of the ellipse.
-                *  @param height The height of the ellipse.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0.3
-         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-                */
-               public function drawEllipse(x:Number, y:Number, width:Number, 
height:Number):void
-               {
-            COMPILE::SWF
-            {
-                applyStroke();
-                beginFill(new Rectangle(x,y,width,height), new Point(x,y));
-                graphics.drawEllipse(x,y,width,height);
-                endFill();
-            }
-            COMPILE::JS
-            {
-                var style:String = getStyleStr();
-                var ellipse:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as 
WrappedHTMLElement;
-                ellipse.flexjs_wrapper = this;
-                ellipse.style.left = x;
-                ellipse.style.top = y;
-                ellipse.setAttribute('style', style);
-                ellipse.setAttribute('cx', String(x + width / 2));
-                ellipse.setAttribute('cy', String(y + height / 2));
-                ellipse.setAttribute('rx', String(width / 2));
-                ellipse.setAttribute('ry', String(height / 2));
-                element.appendChild(ellipse);
-            }
-               }
-
-               /**
-                *  Draw the circle.
-                *  @param x The x location of the center of the circle
-                *  @param y The y location of the center of the circle.
-                *  @param radius The radius of the circle.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0
-         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-                */
-               public function drawCircle(x:Number, y:Number, 
radius:Number):void
-               {
-            COMPILE::SWF
-            {
-                applyStroke();
-                beginFill(new Rectangle(x,y,radius*2, radius*2),new 
Point(x-radius,y-radius));
-                graphics.drawCircle(x,y,radius);
-                endFill();
-            }
-            COMPILE::JS
-            {
-                var style:String = getStyleStr();
-                var circle:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as 
WrappedHTMLElement;
-                circle.flexjs_wrapper = this;
-                circle.style.left = x;
-                circle.style.top = y;
-                circle.setAttribute('style', style);
-                circle.setAttribute('cx', String(x));
-                circle.setAttribute('cy', String(y));
-                circle.setAttribute('rx', String(radius));
-                circle.setAttribute('ry', String(radius));
-                element.appendChild(circle);
-
-            }
-               }
-
-               /**
-                *  Draw the path.
-                *  @param data A string containing a compact represention of 
the path segments.
-                *  The value is a space-delimited string describing each path 
segment. Each
-                *  segment entry has a single character which denotes the 
segment type and
-                *  two or more segment parameters.
-                *
-                *  If the segment command is upper-case, the parameters are 
absolute values.
-                *  If the segment command is lower-case, the parameters are 
relative values.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0
-         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-                */
-               public function drawPath(data:String):void
-               {
-            COMPILE::SWF
-            {
-                applyStroke();
-                var bounds:Rectangle = PathHelper.getBounds(data);
-                beginFill(bounds,bounds.topLeft);
-                var graphicsPath:GraphicsPath = PathHelper.getSegments(data);
-                graphics.drawPath(graphicsPath.commands, graphicsPath.data);
-                endFill();
-            }
-            COMPILE::JS
-            {
-                var style:String = getStyleStr();
-                var path:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'path') as 
WrappedHTMLElement;
-                path.flexjs_wrapper = this;
-                path.style.left = 0;
-                path.style.top = 0;
-                path.setAttribute('style', style);
-                path.setAttribute('d', data);
-                element.appendChild(path);
-            }
-               }
-
-               public function drawLine():void
-               {
-
-               }
-
-               public function drawPolygon():void
-               {
-
-               }
-
-               /**
-                *  Draw a string of characters.
-                *  @param value The string to draw.
-                *  @param x The x location of the center of the circle
-                *  @param y The y location of the center of the circle.
-                *
-                *  @langversion 3.0
-                *  @playerversion Flash 10.2
-                *  @playerversion AIR 2.6
-                *  @productversion FlexJS 0.0
-         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-         *  @flexjsignorecoercion Text
-         *  @flexjsignorecoercion Node
-                */
-               public function drawText(value:String, x:Number, 
y:Number):Object
-               {
-            COMPILE::SWF
-            {
-                var textField:CSSTextField = new CSSTextField();
-                addChild(textField);
-
-                textField.selectable = false;
-                textField.type = TextFieldType.DYNAMIC;
-                textField.mouseEnabled = false;
-                textField.autoSize = "left";
-                textField.text = value;
-
-                var lineColor:SolidColorStroke = stroke as SolidColorStroke;
-                if (lineColor) {
-                    textField.textColor = lineColor.color;
-                    textField.alpha = lineColor.alpha;
-                }
-
-                textField.x = x;
-                textField.y = y + textField.textHeight/4;
-
-                return textField;
-
-            }
-            COMPILE::JS
-            {
-                var style:String = getStyleStr();
-                var text:WrappedHTMLElement = 
document.createElementNS('http://www.w3.org/2000/svg', 'text') as 
WrappedHTMLElement;
-                text.flexjs_wrapper = this;
-                text.style.left = x;
-                text.style.top = y;
-                text.setAttribute('style', style);
-                text.setAttribute('x', String(x) + 'px');
-                text.setAttribute('y', String(y + 15) + 'px');
-                var textNode:Text = document.createTextNode(value) as Text;
-                text.appendChild(textNode as Node);
-                element.appendChild(text);
-                return text;
-            }
-               }
-       }
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/Graphics/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/resources/basic-manifest.xml 
b/frameworks/projects/Graphics/src/main/resources/basic-manifest.xml
index e078011..bea49c3 100644
--- a/frameworks/projects/Graphics/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Graphics/src/main/resources/basic-manifest.xml
@@ -25,7 +25,7 @@
        <component id="Ellipse" class="org.apache.flex.svg.Ellipse" />
        <component id="Path" class="org.apache.flex.svg.Path" />
        <component id="Rect" class="org.apache.flex.svg.Rect" />
-       <component id="GraphicsContainer" 
class="org.apache.flex.svg.GraphicsContainer" />
+       <component id="CompoundGraphic" 
class="org.apache.flex.svg.CompoundGraphic" />
     <component id="GradientEntry" 
class="org.apache.flex.graphics.GradientEntry" />
     <component id="LinearGradient" class="org.apache.flex.svg.LinearGradient" 
/>
     <component id="SolidColor" class="org.apache.flex.graphics.SolidColor" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as
index 897a2f7..951f5f7 100644
--- 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridLinesBead.as
@@ -26,7 +26,7 @@ package org.apache.flex.html.beads
        import org.apache.flex.core.IParentIUIBase;
        import org.apache.flex.core.IStrand;
        import org.apache.flex.core.UIBase;
-       import org.apache.flex.svg.GraphicsContainer;
+       import org.apache.flex.svg.CompoundGraphic;
        import org.apache.flex.graphics.IStroke;
        import org.apache.flex.graphics.SolidColor;
        import org.apache.flex.graphics.SolidColorStroke;
@@ -80,7 +80,7 @@ package org.apache.flex.html.beads
                {
                        _strand = value;
                        
-                       _overlay = new GraphicsContainer();
+                       _overlay = new CompoundGraphic();
                        
                        
IEventDispatcher(_strand).addEventListener("beadsAdded", handleBeadsAdded);
                }
@@ -104,7 +104,7 @@ package org.apache.flex.html.beads
                        _stroke = value;
                }
                
-               private var _overlay:GraphicsContainer;
+               private var _overlay:CompoundGraphic;
                private var _area:UIBase;
                
                /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
index 8d3d4df..73bd8bd 100644
--- 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/GraphicsItemRenderer.as
@@ -20,7 +20,7 @@ package org.apache.flex.html.supportClasses
 {
        import org.apache.flex.core.ISelectableItemRenderer;
        import org.apache.flex.core.ValuesManager;
-       import org.apache.flex.svg.GraphicsContainer;
+       import org.apache.flex.svg.CompoundGraphic;
        import org.apache.flex.events.Event;
        import org.apache.flex.utils.MXMLDataInterpreter;
        
@@ -33,7 +33,7 @@ package org.apache.flex.html.supportClasses
         *  @playerversion AIR 2.6
         *  @productversion FlexJS 0.0
         */
-       public class GraphicsItemRenderer extends GraphicsContainer implements 
ISelectableItemRenderer
+       public class GraphicsItemRenderer extends CompoundGraphic implements 
ISelectableItemRenderer
        {
                /**
                 *  Constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a28675d/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml 
b/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml
index 7d05889..bf031f8 100644
--- a/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml
+++ b/manualtests/FlexJSTest_SVG/src/GraphicsView.mxml
@@ -27,7 +27,7 @@ limitations under the License.
                        import org.apache.flex.svg.Circle;
                        import org.apache.flex.svg.Ellipse;
                        import org.apache.flex.graphics.GradientEntry;
-                       import org.apache.flex.svg.GraphicsContainer;
+                       import org.apache.flex.svg.CompoundGraphic;
                        import org.apache.flex.svg.LinearGradient;
                        import org.apache.flex.svg.Path;
                        import org.apache.flex.svg.Rect;
@@ -38,7 +38,7 @@ limitations under the License.
                        protected function 
viewbase1_initCompleteHandler(event:org.apache.flex.events.Event):void
                        {
                                //drawIndividualShapes();
-                               //drawOnGraphicsContainer();
+                               //drawOnCompoundGraphic();
                        }
                        
                        private function drawIndividualShapes():void
@@ -198,9 +198,9 @@ limitations under the License.
                                this.addElement(path4);
                        }
                        
-                       private function drawOnGraphicsContainer():void
+                       private function drawOnCompoundGraphic():void
                        {
-                               var container:GraphicsContainer = new 
GraphicsContainer();
+                               var container:CompoundGraphic = new 
CompoundGraphic();
                                
 /*                             var fill:SolidColor = new SolidColor();
                                fill.color = 0xFF0000;

Reply via email to