You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2014/10/16 10:49:39 UTC

[1/5] git commit: [flex-asjs] [refs/heads/develop] - Add FXG graphic style graphic shape declarations

Repository: flex-asjs
Updated Branches:
  refs/heads/develop 1fd43da51 -> d36feac45


Add FXG graphic style graphic shape declarations


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

Branch: refs/heads/develop
Commit: b784b847417ab265f2416c33c93d6acd54e67a2b
Parents: 1fd43da
Author: OmPrakash Muppirala <bi...@gmail.com>
Authored: Thu Oct 16 01:33:59 2014 -0700
Committer: OmPrakash Muppirala <bi...@gmail.com>
Committed: Thu Oct 16 01:33:59 2014 -0700

----------------------------------------------------------------------
 examples/FlexJSTest_SVG/src/GraphicsView.mxml | 69 +++++++++++++++++++++-
 1 file changed, 68 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b784b847/examples/FlexJSTest_SVG/src/GraphicsView.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_SVG/src/GraphicsView.mxml b/examples/FlexJSTest_SVG/src/GraphicsView.mxml
index 6907b3f..3704b10 100644
--- a/examples/FlexJSTest_SVG/src/GraphicsView.mxml
+++ b/examples/FlexJSTest_SVG/src/GraphicsView.mxml
@@ -38,7 +38,7 @@ limitations under the License.
 			protected function viewbase1_initCompleteHandler(event:org.apache.flex.events.Event):void
 			{
 				//drawIndividualShapes();
-				drawOnGraphicsContainer();
+				//drawOnGraphicsContainer();
 			}
 			
 			private function drawIndividualShapes():void
@@ -251,5 +251,72 @@ limitations under the License.
 			
 		]]>
     </fx:Script>
+	<basic:Rect x="0" y="0" width="200" height="200" >
+		<basic:fill>
+			<basic:SolidColor color="#FF0000" />
+		</basic:fill>
+	</basic:Rect>
+	
+	<basic:Rect x="300" y="0" width="200" height="200">
+		<basic:fill>
+			<basic:LinearGradient >
+				<basic:entries>
+					<basic:GradientEntry ratio="0.1" alpha="1" color="#FF0000" />
+					<basic:GradientEntry ratio="0.9" alpha="1" color="#0000FF" />
+				</basic:entries>
+			</basic:LinearGradient>
+		</basic:fill>
+	</basic:Rect>
+	
+	<basic:Circle x="100" y="350" radius="100">
+		<basic:fill>
+			<basic:LinearGradient >
+				<basic:entries>
+					<basic:GradientEntry ratio="0.1" alpha="1" color="#FF0000" />
+					<basic:GradientEntry ratio="0.9" alpha="1" color="#0000FF" />
+				</basic:entries>
+			</basic:LinearGradient>
+		</basic:fill>
+	</basic:Circle>
+	
+	<basic:Circle x="400" y="350" radius="100">
+		<basic:fill>
+			<basic:SolidColor color="#0000FF" alpha="0.5" />
+		</basic:fill>
+	</basic:Circle>
+	
+	<basic:Ellipse x="0" y="500" width="200" height="100" >
+		<basic:fill>
+			<basic:LinearGradient >
+				<basic:entries>
+					<basic:GradientEntry ratio="0.1" alpha="1" color="#FF0000" />
+					<basic:GradientEntry ratio="0.9" alpha="1" color="#0000FF" />
+				</basic:entries>
+			</basic:LinearGradient>
+		</basic:fill>
+	</basic:Ellipse>
+	
+	<basic:Ellipse x="300" y="500" width="200" height="100" >
+		<basic:fill>
+			<basic:SolidColor color="#0000FF" alpha="0.5" />
+		</basic:fill>
+	</basic:Ellipse>
+	
+	<basic:Path x="0" y="0" width="1000" height="1000" data="M 800 800 L 900 800 A 100 100 0 0 0 800 700 Z" >
+		<basic:fill>
+			<basic:LinearGradient >
+				<basic:entries>
+					<basic:GradientEntry ratio="0.1" alpha="1" color="#FF0000" />
+					<basic:GradientEntry ratio="0.9" alpha="1" color="#0000FF" />
+				</basic:entries>
+			</basic:LinearGradient>
+		</basic:fill>
+	</basic:Path>
+	
+	<basic:Path x="0" y="300" width="200" height="100" data="M 100 350 q 150 -300 300 0" >
+		<basic:fill>
+			<basic:SolidColor color="#0000FF" alpha="0.5" />
+		</basic:fill>
+	</basic:Path>
 	
 </basic:ViewBase>


[5/5] git commit: [flex-asjs] [refs/heads/develop] - Update how we draw from AS3

Posted by bi...@apache.org.
Update how we draw from AS3


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

Branch: refs/heads/develop
Commit: d36feac4598446b6e98c2b301f4c73823c1ae8a7
Parents: 58cbb52
Author: OmPrakash Muppirala <bi...@gmail.com>
Authored: Thu Oct 16 01:48:42 2014 -0700
Committer: OmPrakash Muppirala <bi...@gmail.com>
Committed: Thu Oct 16 01:48:42 2014 -0700

----------------------------------------------------------------------
 examples/FlexJSTest_SVG/src/GraphicsView.mxml | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d36feac4/examples/FlexJSTest_SVG/src/GraphicsView.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_SVG/src/GraphicsView.mxml b/examples/FlexJSTest_SVG/src/GraphicsView.mxml
index 3704b10..2cda028 100644
--- a/examples/FlexJSTest_SVG/src/GraphicsView.mxml
+++ b/examples/FlexJSTest_SVG/src/GraphicsView.mxml
@@ -37,7 +37,7 @@ limitations under the License.
 
 			protected function viewbase1_initCompleteHandler(event:org.apache.flex.events.Event):void
 			{
-				//drawIndividualShapes();
+				drawIndividualShapes();
 				//drawOnGraphicsContainer();
 			}
 			
@@ -139,7 +139,9 @@ limitations under the License.
 				stroke.color = 0x123456;
 				stroke.weight = 2;
 				circle1.stroke = stroke;
-				circle1.drawCircle(700,300,200);
+				circle1.x = 700;
+				circle1.y = 200;
+				circle1.radius = 200;
 				this.addElement(circle1);
 				
 				var circle2:Circle = new Circle();
@@ -149,7 +151,10 @@ limitations under the License.
 				stroke.color = 0xccff11;
 				stroke.weight = 5;
 				circle2.stroke = stroke;
-				circle2.drawCircle(100,700,100);
+				circle2.x = 100;
+				circle2.y = 700;
+				circle2.radius = 100;
+				//circle2.drawCircle(100,700,100);
 				this.addElement(circle2);
 				
 				var path1:Path = new Path();
@@ -251,7 +256,7 @@ limitations under the License.
 			
 		]]>
     </fx:Script>
-	<basic:Rect x="0" y="0" width="200" height="200" >
+<!--	<basic:Rect x="0" y="0" width="200" height="200" >
 		<basic:fill>
 			<basic:SolidColor color="#FF0000" />
 		</basic:fill>
@@ -317,6 +322,6 @@ limitations under the License.
 		<basic:fill>
 			<basic:SolidColor color="#0000FF" alpha="0.5" />
 		</basic:fill>
-	</basic:Path>
+	</basic:Path>-->
 	
 </basic:ViewBase>


[2/5] git commit: [flex-asjs] [refs/heads/develop] - Add core.graphics shapes to basic-manifest.xml

Posted by bi...@apache.org.
Add core.graphics shapes to basic-manifest.xml


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

Branch: refs/heads/develop
Commit: 024d633e74919a062cfee768a761c270e20b3729
Parents: b784b84
Author: OmPrakash Muppirala <bi...@gmail.com>
Authored: Thu Oct 16 01:34:33 2014 -0700
Committer: OmPrakash Muppirala <bi...@gmail.com>
Committed: Thu Oct 16 01:34:33 2014 -0700

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/basic-manifest.xml | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/024d633e/frameworks/as/projects/FlexJSUI/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/basic-manifest.xml b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
index 01cc765..df0f9b3 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -93,6 +93,11 @@
 
     <component id="Map" class="org.apache.flex.maps.google.Map" />
 
+	<component id="Circle" class="org.apache.flex.core.graphics.Circle" />
+	<component id="Ellipse" class="org.apache.flex.core.graphics.Ellipse" />
+	<component id="Path" class="org.apache.flex.core.graphics.Path" />
+	<component id="Rect" class="org.apache.flex.core.graphics.Rect" />
+	<component id="GraphicsContainer" class="org.apache.flex.core.graphics.GraphicsContainer" />
     <component id="GradientEntry" class="org.apache.flex.core.graphics.GradientEntry" />
     <component id="LinearGradient" class="org.apache.flex.core.graphics.LinearGradient" />
     <component id="SolidColor" class="org.apache.flex.core.graphics.SolidColor" />


[3/5] git commit: [flex-asjs] [refs/heads/develop] - Rect has moved to basic-manifest.xml

Posted by bi...@apache.org.
Rect has moved to basic-manifest.xml


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

Branch: refs/heads/develop
Commit: 019f95d5351e870914847bc7a5b654b3c370eb34
Parents: 024d633
Author: OmPrakash Muppirala <bi...@gmail.com>
Authored: Thu Oct 16 01:34:57 2014 -0700
Committer: OmPrakash Muppirala <bi...@gmail.com>
Committed: Thu Oct 16 01:34:57 2014 -0700

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/svg-manifest.xml | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/019f95d5/frameworks/as/projects/FlexJSUI/svg-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/svg-manifest.xml b/frameworks/as/projects/FlexJSUI/svg-manifest.xml
index 998b54c..a32483e 100644
--- a/frameworks/as/projects/FlexJSUI/svg-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/svg-manifest.xml
@@ -20,8 +20,5 @@
 
 
 <componentPackage>
-
     <component id="TextButton" class="org.apache.flex.svg.TextButton"/>
-	<component id="Rect" class="org.apache.flex.core.graphics.Rect" />
-
 </componentPackage>


[4/5] git commit: [flex-asjs] [refs/heads/develop] - Update Shape classes to support declaration in MXML

Posted by bi...@apache.org.
Update Shape classes to support declaration in MXML


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

Branch: refs/heads/develop
Commit: 58cbb52c1839e6bda5e012474c0002502ad1cc6c
Parents: 019f95d
Author: OmPrakash Muppirala <bi...@gmail.com>
Authored: Thu Oct 16 01:37:29 2014 -0700
Committer: OmPrakash Muppirala <bi...@gmail.com>
Committed: Thu Oct 16 01:37:29 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/core/graphics/Circle.as | 18 ++++++++-
 .../org/apache/flex/core/graphics/Ellipse.as    |  7 +++-
 .../apache/flex/core/graphics/GradientEntry.as  |  2 +-
 .../apache/flex/core/graphics/GraphicShape.as   | 14 +++++++
 .../src/org/apache/flex/core/graphics/Path.as   | 20 +++++++++-
 .../src/org/apache/flex/core/graphics/Rect.as   |  5 +++
 .../src/org/apache/flex/core/graphics/Circle.js | 28 ++++++++++++++
 .../org/apache/flex/core/graphics/Ellipse.js    |  7 ++++
 .../apache/flex/core/graphics/GraphicShape.js   | 39 +++++++-------------
 .../src/org/apache/flex/core/graphics/Path.js   | 33 ++++++++++++++++-
 .../src/org/apache/flex/core/graphics/Rect.js   |  7 ++++
 11 files changed, 148 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Circle.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Circle.as
index fdbb336..e67e97f 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Circle.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Circle.as
@@ -19,7 +19,18 @@ package org.apache.flex.core.graphics
 
 	public class Circle extends GraphicShape
 	{
-		
+		private var _radius:Number;
+
+		public function get radius():Number
+		{
+			return _radius;
+		}
+
+		public function set radius(value:Number):void
+		{
+			_radius = value;
+		}
+
 		/**
 		 *  Draw the circle.
 		 *  @param x The x location of the center of the circle
@@ -40,5 +51,10 @@ package org.apache.flex.core.graphics
 			endFill();
 		}
 		
+		override public function addedToParent():void
+		{
+			drawCircle(0, 0, radius);
+		}
+		
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Ellipse.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Ellipse.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Ellipse.as
index 32dc73a..8226363 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Ellipse.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Ellipse.as
@@ -1,7 +1,5 @@
 package org.apache.flex.core.graphics
 {
-	import flash.display.CapsStyle;
-	import flash.display.JointStyle;
 	import flash.geom.Point;
 	import flash.geom.Rectangle;
 
@@ -29,5 +27,10 @@ package org.apache.flex.core.graphics
 			endFill();
 		}
 		
+		override protected function draw():void
+		{
+			this.drawEllipse(0, 0, width, height);	
+		}
+		
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GradientEntry.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GradientEntry.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GradientEntry.as
index 92a1765..0124c13 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GradientEntry.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GradientEntry.as
@@ -34,7 +34,7 @@ package org.apache.flex.core.graphics
 		private var _ratio:Number = 0x000000;
 		
 		
-		public function GradientEntry(alpha:Number, color:uint, ratio:Number)
+		public function GradientEntry(alpha:Number = 1.0, color:uint = 0x000000, ratio:Number = 1.0)
 		{
 			_alpha = alpha;
 			_color = color;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GraphicShape.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GraphicShape.as
index b5decbc..0b04b39 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GraphicShape.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/GraphicShape.as
@@ -84,5 +84,19 @@ package org.apache.flex.core.graphics
 			}
 		}
 		
+		/**
+		 * This is where the drawing methods get called from
+		 */
+		protected function draw():void
+		{
+			//Overwrite in subclass
+		}
+		
+		override public function addedToParent():void
+		{
+			super.addedToParent();
+			draw();
+		}
+		
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Path.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Path.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Path.as
index 7d1eb53..e02dd95 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Path.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Path.as
@@ -23,6 +23,18 @@ package org.apache.flex.core.graphics
 	public class Path extends GraphicShape
 	{
 		
+		private var _data:String;
+		
+		public function get data():String
+		{
+			return _data;
+		}
+
+		public function set data(value:String):void
+		{
+			_data = value;
+		}
+
 		/**
 		 *  Draw the path.
 		 *  @param data A string containing a compact represention of the path segments.
@@ -44,11 +56,17 @@ package org.apache.flex.core.graphics
 			graphics.clear();
 			applyStroke();
 			var bounds:Rectangle = PathHelper.getBounds(data);
+			this.width = bounds.width;
+			this.height = bounds.height;
 			beginFill(bounds,new Point(bounds.left + x, bounds.top + y) );
 			var graphicsPath:GraphicsPath = PathHelper.getSegments(data,x,y);
 			graphics.drawPath(graphicsPath.commands, graphicsPath.data);
 			endFill();
-			
+		}
+		
+		override protected function draw():void
+		{
+			drawPath(0, 0, data);
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as
index d30a599..fd8d636 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as
@@ -43,5 +43,10 @@ package org.apache.flex.core.graphics
 			endFill();
 		}
 		
+		override protected function draw():void
+		{
+			drawRect(0,0,width,height);
+		}
+		
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js
index 71d4716..1d56a8c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js
@@ -25,6 +25,11 @@ goog.require('org.apache.flex.core.graphics.GraphicShape');
 org.apache.flex.core.graphics.Circle = function() {
   org.apache.flex.core.graphics.Circle.base(this, 'constructor');
 
+   /**
+   * @private
+   * @type {number}
+   */
+  this.radius_ = 0;
 };
 goog.inherits(org.apache.flex.core.graphics.Circle,
     org.apache.flex.core.graphics.GraphicShape);
@@ -39,6 +44,22 @@ org.apache.flex.core.graphics.Circle.prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'Circle',
                 qName: 'org.apache.flex.core.graphics.Circle' }] };
 
+/**
+ * @expose
+ * @param {number} v The radius of the circle
+ */
+org.apache.flex.core.graphics.Circle.prototype.set_radius = function(v) {
+  this.radius_ = v;
+};
+
+
+/**
+ * @expose
+ * @return {number} The radius of the circle
+ */
+org.apache.flex.core.graphics.Circle.prototype.get_radius = function() {
+  return this.radius_;
+};				
 
 /**
  * @expose
@@ -67,3 +88,10 @@ org.apache.flex.core.graphics.Circle.prototype.drawCircle = function(x, y, radiu
     circle.setAttribute('ry', String(radius));
     this.element.appendChild(circle);
   };
+
+/**
+ * @override
+*/
+  org.apache.flex.core.graphics.Circle.prototype.draw = function() {
+    this.drawCircle(this.get_x(), this.get_y(), this.get_radius());
+  };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Ellipse.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Ellipse.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Ellipse.js
index 00a7400..c2d45cd 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Ellipse.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Ellipse.js
@@ -67,3 +67,10 @@ org.apache.flex.core.graphics.Ellipse.prototype.drawEllipse = function(x, y, wid
     ellipse.setAttribute('ry', String(height / 2));
     this.element.appendChild(ellipse);
   };
+
+/**
+ * @override
+*/
+  org.apache.flex.core.graphics.Ellipse.prototype.draw = function() {
+    this.drawEllipse(this.get_x(), this.get_y(), this.get_width(), this.get_height());
+  };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicShape.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicShape.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicShape.js
index 1580e43..a869062 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicShape.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicShape.js
@@ -12,19 +12,19 @@
  * limitations under the License.
  */
 
-//TODO Should implment IUIBase
 goog.provide('org.apache.flex.core.graphics.GraphicShape');
-
+goog.require('org.apache.flex.core.UIBase');
 goog.require('org.apache.flex.core.graphics.SolidColor');
 goog.require('org.apache.flex.core.graphics.SolidColorStroke');
 
-
-
 /**
  * @constructor
+ * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.core.graphics.GraphicShape = function() {
-
+  
+  org.apache.flex.core.graphics.GraphicShape.base(this, 'constructor');
+  
   /**
    * @private
    * @type {org.apache.flex.core.graphics.IFill}
@@ -66,27 +66,9 @@ org.apache.flex.core.graphics.GraphicShape = function() {
    * @type {SVGElement}
    */
   this.element = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
-
-
-};
-
-
-/**
- * @expose
- * @param {number} value New X position.
- */
-org.apache.flex.core.graphics.GraphicShape.prototype.set_x = function(value) {
-  this.x_ = value;
-};
-
-
-/**
- * @expose
- * @param {number} value New Y position.
- */
-org.apache.flex.core.graphics.GraphicShape.prototype.set_y = function(value) {
-  this.y_ = value;
 };
+goog.inherits(org.apache.flex.core.graphics.GraphicShape,
+    org.apache.flex.core.UIBase);
 
 
 /**
@@ -138,10 +120,17 @@ org.apache.flex.core.graphics.GraphicShape.prototype.set_stroke = function(value
  *
  */
 org.apache.flex.core.graphics.GraphicShape.prototype.addedToParent = function() {
+  this.draw();
   var bbox = this.element.getBBox();
   this.resize(this.x_, this.y_, bbox);
 };
 
+/**
+ * This is where the drawing methods get called from 
+ */
+org.apache.flex.core.graphics.GraphicShape.prototype.draw = function() {
+  //Overwrite in subclass
+};
 
 /**
  * @expose

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
index d530ef3..776370d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Path.js
@@ -25,6 +25,11 @@ goog.require('org.apache.flex.core.graphics.GraphicShape');
 org.apache.flex.core.graphics.Path = function() {
   org.apache.flex.core.graphics.Path.base(this, 'constructor');
 
+   /**
+   * @private
+   * @type {string}
+   */
+  this.data_ = "";
 };
 goog.inherits(org.apache.flex.core.graphics.Path,
     org.apache.flex.core.graphics.GraphicShape);
@@ -39,11 +44,28 @@ org.apache.flex.core.graphics.Path.prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'Path',
                 qName: 'org.apache.flex.core.graphics.Path' }] };
 
+				
+/**
+ * @expose
+ * @param {string} v The string representation of the path data
+ */
+org.apache.flex.core.graphics.Path.prototype.set_data = function(v) {
+  this.data_ = v;
+};
+
 
 /**
  * @expose
- * @param {number} x The x location of the center of the Path.
- * @param {number} y The y location of the center of the Path.
+ * @return {string} The string representation of the path data
+ */
+org.apache.flex.core.graphics.Path.prototype.get_data = function() {
+  return this.data_;
+};						
+
+/**
+ * @expose
+ * @param {number} x The x location of the Path.
+ * @param {number} y The y location of the Path.
  * @param {string} 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
@@ -67,3 +89,10 @@ org.apache.flex.core.graphics.Path.prototype.drawPath = function(x, y, data) {
       this.setPosition(x, y, 0, 0);
     }
   };
+
+ /**
+ * @override
+*/
+  org.apache.flex.core.graphics.Path.prototype.draw = function() {
+    this.drawPath(this.get_x(), this.get_y(), this.get_data());
+  }; 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/58cbb52c/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
index 01f784c..7ab8078 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
@@ -67,3 +67,10 @@ org.apache.flex.core.graphics.Rect.prototype.drawRect = function(x, y, width, he
     rect.setAttribute('height', String(height) + 'px');
     this.element.appendChild(rect);
   };
+
+/**
+ * @override
+*/
+  org.apache.flex.core.graphics.Rect.prototype.draw = function() {
+    this.drawRect(this.get_x(), this.get_y(), this.get_width(), this.get_height());
+  };
\ No newline at end of file