You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2021/01/03 19:26:22 UTC
[royale-asjs] branch ChildResize updated: Width and height are set
on clear so need to do measure before that
This is an automated email from the ASF dual-hosted git repository.
yishayw pushed a commit to branch ChildResize
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/ChildResize by this push:
new 823550a Width and height are set on clear so need to do measure before that
823550a is described below
commit 823550a7ca0215cda574d336f37c7e439502582a
Author: Yishay Weiss <yi...@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();
}
}