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
commit 536681635560fc3bae427a41face86c5bcfbba43 Author: Yishay Weiss <yishayj...@hotmail.com> AuthorDate: Sun Jan 3 21:26:06 2021 +0200 Width and height are set on clear so need to do measure before that --- .../SparkRoyale/src/main/royale/spark/primitives/Line.as | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 0b6249d..a87bb28 100644 --- a/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as +++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as @@ -403,12 +403,9 @@ public class Line extends UIComponent unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth,unscaledHeight); - var g:Graphics = graphics; if (stroke is SolidColorStroke) { var solidColorStroke:SolidColorStroke = stroke as SolidColorStroke; - g.lineStyle(solidColorStroke.weight, solidColorStroke.color, solidColorStroke.alpha); - g.clear(); if (!isNaN(_xFrom) && !isNaN(_yFrom) && !isNaN(_xTo) && !isNaN(_yTo) ) { realXFrom = _xFrom; @@ -440,10 +437,13 @@ public class Line extends UIComponent return; } } - measure(); - draw(g); width = Math.max(width, solidColorStroke.weight); height = Math.max(height, solidColorStroke.weight); + var g:Graphics = graphics; + g.lineStyle(solidColorStroke.weight, solidColorStroke.color, solidColorStroke.alpha); + g.clear(); + measure(); + draw(g); g.endStroke(); } }