You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/10/31 22:27:41 UTC

[royale-asjs] 06/09: get fill and stroke to work

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 5bd14911834180840043c9a1deea22fcb328cd87
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Oct 31 15:25:28 2018 -0700

    get fill and stroke to work
---
 .../projects/MXRoyale/src/main/royale/mx/graphics/SolidColor.as      | 5 ++++-
 .../MXRoyale/src/main/royale/mx/graphics/SolidColorStroke.as         | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/graphics/SolidColor.as b/frameworks/projects/MXRoyale/src/main/royale/mx/graphics/SolidColor.as
index f8ba794..00d0c12 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/graphics/SolidColor.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/graphics/SolidColor.as
@@ -27,15 +27,18 @@ package mx.graphics
 		public function SolidColor(color:uint = 0x000000, alpha:Number = 1.0)
 	 	{
 			super();
+            this.color = color;
+            this.alpha = alpha;
 		}
         
         public function begin(g:Graphics,targetBounds:Rectangle,targetOrigin:Point):void
         {
-            trace("SolidColor begin not implemented");
+            g.beginFill(color, alpha);
         }
         
         public function end(g:Graphics):void
         {
+            g.endFill();
         }
 
         private var _alpha:Number;
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/graphics/SolidColorStroke.as b/frameworks/projects/MXRoyale/src/main/royale/mx/graphics/SolidColorStroke.as
index 29de512..b4a4d5c 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/graphics/SolidColorStroke.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/graphics/SolidColorStroke.as
@@ -35,6 +35,7 @@ package mx.graphics
 			super();
             this.weight = weight;
             this.color = color;
+            this.alpha = alpha;
 		}
 		
 	private var _weight:Number;
@@ -108,7 +109,7 @@ package mx.graphics
     
     public function apply(g:Graphics, targetBounds:Rectangle = null, targetOrigin:Point = null):void
     {
-        trace("SolidColorStroke.apply not implemented");
+        g.lineStyle(weight, color, alpha);
     }
 
     }