flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject git commit: [flex-asjs] [refs/heads/refactor-sprite] - Add closed path as a parameter.
Date Sun, 04 Sep 2016 09:29:20 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/refactor-sprite 38591297b -> 4ee2280eb


Add closed path as a parameter.


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

Branch: refs/heads/refactor-sprite
Commit: 4ee2280eb266dd69fc8d5f6da967aba7281f0fdf
Parents: 3859129
Author: yishayw <yishayjobs@hotmail.com>
Authored: Sun Sep 4 12:29:05 2016 +0300
Committer: yishayw <yishayjobs@hotmail.com>
Committed: Sun Sep 4 12:29:05 2016 +0300

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/graphics/PathBuilder.as    | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4ee2280e/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/PathBuilder.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/PathBuilder.as
b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/PathBuilder.as
index 1adb7a0..47359fc 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/PathBuilder.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/PathBuilder.as
@@ -31,14 +31,20 @@ package org.apache.flex.graphics
          *  @playerversion AIR 1.1
          *  @productversion Flex 3
          */
-        public function PathBuilder()
+        public function PathBuilder(closedPath:Boolean=false)
         {
             commands = new Vector.<IPathCommand>();
+			this.closedPath = closedPath;
         }
 
         public function getPathString():String
         {
-            return commands.join(" ");
+			var pathString:String = commands.join(" ");
+            if (closedPath)
+			{
+				pathString += " Z";
+			}
+			return pathString;
         }
         COMPILE::SWF
         public function draw(g:Graphics):void
@@ -65,6 +71,7 @@ package org.apache.flex.graphics
         }
 
         private var commands:Vector.<IPathCommand>;
+        public var closedPath:Boolean;
         
         public function lineTo(x:Number, y:Number):void
         {


Mime
View raw message