flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Graphics interfaces
Date Sun, 05 Mar 2017 13:53:44 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 593e4df8f -> 69917e8e5


Graphics interfaces


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

Branch: refs/heads/develop
Commit: 69917e8e5eacbcb310a0b341d06c816555704ebb
Parents: 593e4df
Author: Harbs <harbs@in-tools.com>
Authored: Sun Mar 5 15:53:37 2017 +0200
Committer: Harbs <harbs@in-tools.com>
Committed: Sun Mar 5 15:53:37 2017 +0200

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/svg/Circle.as |  2 +-
 .../src/main/flex/org/apache/flex/svg/Text.as   | 33 ++++++++++-------
 .../projects/Core/src/main/flex/CoreClasses.as  |  2 +-
 .../Graphics/src/main/flex/GraphicsClasses.as   |  1 +
 .../flex/org/apache/flex/graphics/ICircle.as    | 20 ++++++++++-
 .../apache/flex/graphics/ICompoundGraphic.as    | 16 ++++++++-
 .../flex/org/apache/flex/graphics/IDrawable.as  | 30 ++++++++++++++++
 .../flex/org/apache/flex/graphics/IEllipse.as   | 32 +++++++++++++++++
 .../org/apache/flex/graphics/IGraphicShape.as   | 23 +++++++++++-
 .../main/flex/org/apache/flex/graphics/IRect.as | 26 ++++++++++++++
 .../main/flex/org/apache/flex/graphics/IText.as | 23 +++++++++++-
 .../src/main/flex/org/apache/flex/svg/Circle.as |  4 +--
 .../main/flex/org/apache/flex/svg/Ellipse.as    |  4 +--
 .../flex/org/apache/flex/svg/GraphicShape.as    |  4 +--
 .../src/main/flex/org/apache/flex/svg/Path.as   |  2 +-
 .../src/main/flex/org/apache/flex/svg/Rect.as   |  2 +-
 .../src/main/flex/org/apache/flex/svg/Text.as   | 37 ++++++++++++--------
 17 files changed, 220 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Circle.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Circle.as
index 586bbfd..f76b5c8 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Circle.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Circle.as
@@ -71,7 +71,7 @@ package org.apache.flex.svg
          *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
          *  @flexjsignorecoercion SVGCircleElement
          */
-        public function drawCircle(cx:Number, cy:Number, radius):void
+        public function drawCircle(cx:Number, cy:Number, radius:Number):void
         {
             COMPILE::SWF
             {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Text.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Text.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Text.as
index 767de41..278dcc0 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Text.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/svg/Text.as
@@ -63,12 +63,21 @@ package org.apache.flex.svg
             }
 		}
 		
+		private var _text:String;
+		public function get text():String
+		{
+			return _text;
+		}
+		public function set text(value:String):void
+		{
+			_text = value;
+		}
 
         COMPILE::SWF
 		private var _textField:CSSTextField;
 		
 		COMPILE::JS
-		private var _text:WrappedHTMLElement;
+		private var _textElem:WrappedHTMLElement;
 		
 		/**
 		 *  @copy org.apache.flex.core.ITextModel#textField
@@ -121,21 +130,21 @@ package org.apache.flex.svg
             COMPILE::JS
             {
                 var style:String = this.getStyleStr();
-				if (_text == null) {
-                	_text = document.createElementNS('http://www.w3.org/2000/svg', 'text') as
WrappedHTMLElement;
-                	_text.flexjs_wrapper = this;
-					element.appendChild(_text);
+				if (_textElem == null) {
+                	_textElem = document.createElementNS('http://www.w3.org/2000/svg', 'text')
as WrappedHTMLElement;
+                	_textElem.flexjs_wrapper = this;
+					element.appendChild(_textElem);
 				}
 				else {
-					_text.removeChild(_text.childNodes[0]);
+					_textElem.removeChild(_textElem.childNodes[0]);
 				}
-                _text.setAttribute('style', style);
-                _text.setAttribute('x', xt);
-                _text.setAttribute('y', yt);
+                _textElem.setAttribute('style', style);
+                _textElem.setAttribute('x', xt);
+                _textElem.setAttribute('y', yt);
 				var textNode:Text = document.createTextNode(value) as Text;
-				_text.appendChild(textNode as Node);
+				_textElem.appendChild(textNode as Node);
                 
-                resize(x, y, (_text as SVGLocatable).getBBox());
+                resize(x, y, (_textElem as SVGLocatable).getBBox());
 
             }
 		}
@@ -143,7 +152,7 @@ package org.apache.flex.svg
         COMPILE::JS
         override protected function draw():void
         {
-            
+            drawText(text, x, y);
         }
 
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/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 43a4e2b..9f3db99 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -31,7 +31,7 @@ internal class CoreClasses
     import org.apache.flex.core.BrowserWindow; BrowserWindow;
 	COMPILE::SWF
 	{
-		import Promise; Promise;
+		// import Promise; Promise;
 		import org.apache.flex.core.ApplicationFactory; ApplicationFactory;
 		import org.apache.flex.core.CSSShape; CSSShape;
 		import org.apache.flex.core.CSSSprite; CSSSprite;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/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 a65ab50..3b87a56 100644
--- a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
+++ b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
@@ -44,6 +44,7 @@ internal class GraphicsClasses
 	}
 	import org.apache.flex.graphics.QuadraticCurve; QuadraticCurve;
 	import org.apache.flex.graphics.ICircle; ICircle;
+	import org.apache.flex.graphics.IDrawable; IDrawable;
 	import org.apache.flex.graphics.ICompoundGraphic; ICompoundGraphic;
 	import org.apache.flex.graphics.IEllipse; IEllipse;
 	import org.apache.flex.graphics.IPath; IPath;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ICircle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ICircle.as
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ICircle.as
index a7147a3..0d1cf7d 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ICircle.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ICircle.as
@@ -15,6 +15,24 @@ package org.apache.flex.graphics
 {
 	public interface ICircle extends IGraphicShape
 	{
-		
+		/**
+		 *  The size of the circle's radius.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
+		function get radius():Number;
+		function set radius(value:Number):void;
+		/**
+		 *  Draws the circle. (The same behavior as the default draw() method, but requires specifying
the center x and y and radius explicitly.)
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
+		function drawCircle(cx:Number, cy:Number, radius:Number):void
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/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
index 164dea6..c4a23ed 100644
--- 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
@@ -16,12 +16,26 @@ package org.apache.flex.graphics
 {
 	public interface ICompoundGraphic extends IGraphicShape
 	{
+        /**
+         *  Clears all of the drawn path data.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.7.0
+         */
 		function clear():void;
 		function drawRect(x:Number, y:Number, width:Number, height:Number):void;
+		function drawRoundRect(x:Number, y:Number, width:Number, height:Number, radiusX:Number,
radiusY:Number = NaN):void;
+		function drawRoundRectComplex(x:Number, y:Number,  width:Number, height:Number, topLeftRadius:Number,
topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number):void;
+		function drawRoundRectComplex2(x:Number, y:Number, width:Number, height:Number, radiusX:Number,
radiusY:Number,
+			topLeftRadiusX:Number, topLeftRadiusY:Number,topRightRadiusX:Number, topRightRadiusY:Number,
+			bottomLeftRadiusX:Number, bottomLeftRadiusY:Number,bottomRightRadiusX:Number, bottomRightRadiusY:Number):void;
 		function drawEllipse(x:Number, y:Number, width:Number, height:Number):void;
 		function drawCircle(x:Number, y:Number, radius:Number):void;
 		function drawStringPath(data:String):void;
-		function drawPathCommands(data:PathBuilder):void
+		function drawPathCommands(data:PathBuilder):void;
+
 		function drawText(value:String, x:Number, y:Number):Object;
 		function get textFill():IFill;
 		function set textFill(value:IFill):void;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IDrawable.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IDrawable.as
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IDrawable.as
new file mode 100644
index 0000000..191468e
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IDrawable.as
@@ -0,0 +1,30 @@
+/**
+ * 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 IDrawable
+	{
+		/**
+		 *  Performs the default draw command.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
+		function draw():void;
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IEllipse.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IEllipse.as
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IEllipse.as
index bc2b7c5..b490dcc 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IEllipse.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IEllipse.as
@@ -15,6 +15,38 @@ package org.apache.flex.graphics
 {
 	public interface IEllipse extends IGraphicShape
 	{
+
+		/**
+		 * The horizontal radius of the ellipse.
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.7
+		 */
+		function get rx():Number;
+		function set rx(value:Number):void;
+		/**
+		 * The vertical radius of the ellipse.
+		 * 
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion FlexJS 0.7
+		 */
+		function get ry():Number;
+		function set ry(value:Number):void;
+		/**
+         *  Draw the ellipse. (The same behavior as the default draw() method, but requires
specifying the x and y explicitly.)
+         *  @param xp The x position of the top-left corner of the bounding box of the ellipse.
+         *  @param yp The y position of the top-left corner of the bounding box of the ellipse.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
+		function drawEllipse(xp:Number, yp:Number):void;
 		
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as
index ffc9383..9c59b3c 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IGraphicShape.as
@@ -18,6 +18,27 @@ package org.apache.flex.graphics
 
 	public interface IGraphicShape extends IUIBase
 	{
-		
+		/**
+		 *  The stroke of the graphic.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
+		function get stroke():IStroke;
+		function set stroke(value:IStroke):void;
+
+		/**
+		 *  The fill of the graphic.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
+		function get fill():IFill;
+		function set fill(value:IFill):void;
+
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IRect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IRect.as
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IRect.as
index 2af539c..791e8f8 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IRect.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IRect.as
@@ -15,10 +15,36 @@ package org.apache.flex.graphics
 {
 	public interface IRect extends IGraphicShape
 	{
+		/**
+		 *  The x corner radius.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
 		function get rx():Number;
 		function set rx(value:Number):void;
+
+		/**
+		 *  The y corner radius.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
 		function get ry():Number;
 		function set ry(value:Number):void;
+
+		/**
+		 *  Draws the rect. (The same behavior as the default draw() method, but requires specifying
the rect explicitly).
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
 		function drawRect(xp:Number, yp:Number, width:Number, height:Number):void;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IText.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IText.as
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IText.as
index 497b0ec..ac56d6b 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IText.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IText.as
@@ -15,6 +15,27 @@ package org.apache.flex.graphics
 {
 	public interface IText extends IGraphicShape
 	{
-		
+		/**
+         *  The text to draw.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
+		function get text():String;
+		function set text(value:String):void;
+
+		/**
+         *  Draw the text. (The same behavior as the default draw() method, but requires
specifying the text, x and y explicitly.)
+         *  @param xp The x position of the top-left corner of the bounding box of the ellipse.
+         *  @param yp The y position of the top-left corner of the bounding box of the ellipse.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.8
+		 */
+		function drawText(value:String, xt:Number, yt:Number):void
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Circle.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Circle.as
index 07cc3d5..8be9869 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Circle.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Circle.as
@@ -72,7 +72,7 @@ package org.apache.flex.svg
          *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
          *  @flexjsignorecoercion SVGCircleElement
          */
-        public function drawCircle(cx:Number, cy:Number, radius):void
+        public function drawCircle(cx:Number, cy:Number, radius:Number):void
         {
             COMPILE::SWF
             {
@@ -110,7 +110,7 @@ package org.apache.flex.svg
             }
         }
         
-        override protected function draw():void
+        override protected function drawImpl():void
         {
             drawCircle(0, 0, radius);
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Ellipse.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Ellipse.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Ellipse.as
index 2cfd95e..e577177 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Ellipse.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Ellipse.as
@@ -115,8 +115,6 @@ package org.apache.flex.svg
          *  Draw the ellipse.
          *  @param xp The x position of the top-left corner of the bounding box of the ellipse.
          *  @param yp 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
@@ -162,7 +160,7 @@ package org.apache.flex.svg
             }
         }
         
-        override protected function draw():void
+        override protected function drawImpl():void
         {
             drawEllipse(0, 0);    
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/GraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/GraphicShape.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/GraphicShape.as
index 3ff3a11..19fb305 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/GraphicShape.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/GraphicShape.as
@@ -130,7 +130,7 @@ package org.apache.flex.svg
 		/**
 		 * This is where the drawing methods get called from
 		 */
-		protected function draw():void
+		protected function drawImpl():void
 		{
 			//Overwrite in subclass
 		}
@@ -138,7 +138,7 @@ package org.apache.flex.svg
 		override public function addedToParent():void
 		{
             super.addedToParent();
-			draw();
+			drawImpl();
             COMPILE::JS
             {
                 element.style.overflow = 'visible';

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Path.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Path.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Path.as
index 3369e47..53757b5 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Path.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Path.as
@@ -125,7 +125,7 @@ package org.apache.flex.svg
             }
         }
 
-        override protected function draw():void
+        override protected function drawImpl():void
         {
             drawStringPath(0, 0, data);
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Rect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Rect.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Rect.as
index b1a57a3..73acb8c 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Rect.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Rect.as
@@ -153,7 +153,7 @@ package org.apache.flex.svg
 			return _rect;
 		}
 
-		override protected function draw():void
+		override protected function drawImpl():void
 		{
 			drawRect(0,0,width,height);
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69917e8e/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Text.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Text.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Text.as
index 51b8135..926f0b3 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Text.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/svg/Text.as
@@ -32,7 +32,7 @@ package org.apache.flex.svg
     }
 	
 	/**
-	 *  Draws a string of characters at a specific location using the stroke
+	 *  Draws a string of characters at a specific location using the fill
 	 *  value of color and alpha.
 	 *
 	 *  @langversion 3.0
@@ -63,12 +63,21 @@ package org.apache.flex.svg
             }
 		}
 		
+		private var _text:String;
+		public function get text():String
+		{
+			return _text;
+		}
+		public function set text(value:String):void
+		{
+			_text = value;
+		}
 
         COMPILE::SWF
 		private var _textField:CSSTextField;
 		
 		COMPILE::JS
-		private var _text:WrappedHTMLElement;
+		private var _textElem:WrappedHTMLElement;
 		
 		/**
 		 *  @copy org.apache.flex.core.ITextModel#textField
@@ -121,29 +130,29 @@ package org.apache.flex.svg
             COMPILE::JS
             {
                 var style:String = this.getStyleStr();
-				if (_text == null) {
-                	_text = document.createElementNS('http://www.w3.org/2000/svg', 'text') as
WrappedHTMLElement;
-                	_text.flexjs_wrapper = this;
-					element.appendChild(_text);
+				if (_textElem == null) {
+                	_textElem = document.createElementNS('http://www.w3.org/2000/svg', 'text')
as WrappedHTMLElement;
+                	_textElem.flexjs_wrapper = this;
+					element.appendChild(_textElem);
 				}
 				else {
-					_text.removeChild(_text.childNodes[0]);
+					_textElem.removeChild(_textElem.childNodes[0]);
 				}
-                _text.setAttribute('style', style);
-                _text.setAttribute('x', xt);
-                _text.setAttribute('y', yt);
+                _textElem.setAttribute('style', style);
+                _textElem.setAttribute('x', xt);
+                _textElem.setAttribute('y', yt);
 				var textNode:Text = document.createTextNode(value) as Text;
-				_text.appendChild(textNode as Node);
+				_textElem.appendChild(textNode as Node);
                 
-                resize(x, y, (_text as SVGLocatable).getBBox());
+                resize(x, y, (_textElem as SVGLocatable).getBBox());
 
             }
 		}
         
         COMPILE::JS
-        override protected function draw():void
+        override protected function drawImpl():void
         {
-            
+            drawText(text,x,y);
         }
 
 	}


Mime
View raw message