开发者

Flex: instead of a LinearGradient fill only the last GradientEntry is displayed

I have a Rect with the following fill:

<s:LinearGradient id="goldGradientFill">
    <s:entries>
        <s:GradientEntry color="#6B4822" ratio="0" />
        <s:GradientEntry color="#FDE3C0" ratio="1" />
    </s:entries>
</s:LinearGradient>

But instead of a two color fill only the last GradientEntry color (#FDE3C0) is displayed. In my case there are 3 rects with this fill. One displays the gradient like it should.

The code for alle three rects is the same:

var myRect:Rect = new Rect();
myRect.height = 30;
myRect.width = 4;
myRect.fill = goldGradientFill;
myGraphics.addElement(myRect);

Is there anyone wh开发者_如何学Co experienced a problem like this one?

(update) I added some screens.

Flex: instead of a LinearGradient fill only the last GradientEntry is displayed

Flex: instead of a LinearGradient fill only the last GradientEntry is displayed


It seems that this is due to a limitation of the LinearGradient. The width of the Rect has to be minimum 5 pixels so that a gradient is displayed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜