0
    <s:Group id="ellipse2">
        <s:Rect> 
            <s:stroke> 
                <s:LinearGradientStroke rotation="90" weight="1"> 
                    <s:GradientEntry color="0x000000" alpha="0.5625"/> 
                    <s:GradientEntry color="0x000000" alpha="0.75"/> 
                </s:LinearGradientStroke> 
            </s:stroke> 
        </s:Rect>
        <s:Label id="label" text="Hello World" width="100%" height="100%" textAlign="center" verticalAlign="middle" />
    </s:Group>

我必须将这个组放入另一个组吗?或者有一种方法可以在组中设置中心点?

4

1 回答 1

1

You can put the group in another group by putting it in another group, like this.

<s:Group id="MyEllipseParentGroup">
    <s:Group id="ellipse2">
        <s:Rect> 
            <s:stroke> 
                <s:LinearGradientStroke rotation="90" weight="1"> 
                    <s:GradientEntry color="0x000000" alpha="0.5625"/> 
                    <s:GradientEntry color="0x000000" alpha="0.75"/> 
                </s:LinearGradientStroke> 
            </s:stroke> 
        </s:Rect>
        <s:Label id="label" text="Hello World" width="100%" height="100%" textAlign="center" verticalAlign="middle" />
    </s:Group>
</s:Group>

It can be positioned with the X and y properties, or by using a custom layout.

于 2013-05-30T14:58:01.990 回答