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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 289edbe  Avoid false digaonals
289edbe is described below

commit 289edbe70f70ddd203aaa746fb28f42d9623c591
Author: Yishay Weiss <[email protected]>
AuthorDate: Sun Jan 3 22:34:29 2021 +0200

    Avoid false digaonals
---
 .../projects/SparkRoyale/src/main/royale/spark/primitives/Line.as | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as 
b/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as
index 6bb64a1..61a8387 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as
@@ -311,8 +311,8 @@ public class Line extends UIComponent
         // Our bounding box is (x1, y1, x2, y2)
         var x1:Number = measuredX;
         var y1:Number = measuredY;
-        var x2:Number = measuredX + width;
-        var y2:Number = measuredY + height;    
+        var x2:Number = measuredX + measuredWidth;
+        var y2:Number = measuredY + measuredHeight;    
         
         // Which way should we draw the line?
         if ((realXFrom <= realXTo) == (realYFrom <= realYTo))
@@ -414,8 +414,8 @@ public class Line extends UIComponent
                        realYTo = _yTo;
                } else
                {
-                       var hasWidth:Boolean =  !isNaN(unscaledWidth) && 
unscaledWidth > 0;
-                       var hasHeight:Boolean =  !isNaN(unscaledHeight) && 
unscaledHeight > 0;
+                       var hasWidth:Boolean =  !isNaN(unscaledWidth) && 
unscaledWidth > solidColorStroke.weight;
+                       var hasHeight:Boolean =  !isNaN(unscaledHeight) && 
unscaledHeight > solidColorStroke.weight;
                        if (hasWidth || hasHeight)
                        {
                                var isDiagonal:Boolean = hasWidth && hasHeight;

Reply via email to