Flex Gumbo中如何通过将LinearGradientStroke设到stroke属性创建Rect对象线性效果的例子
By Minidxer | June 16, 2009
接下来的例子演示了Flex Gumbo中如何通过将LinearGradientStroke设到stroke属性,创建Rect对象线性效果。
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <Application name="Rect_stroke_LinearGradientStroke_test"
- xmlns="http://ns.adobe.com/mxml/2009"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <Graphic>
- <Rect id="rect" width="300" height="200">
- <stroke>
- <LinearGradientStroke>
- <entries>
- <GradientEntry color="red" />
- <GradientEntry color="white" />
- <GradientEntry color="blue" />
- </entries>
- </LinearGradientStroke>
- </stroke>
- </Rect>
- </Graphic>
- </Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
Gumbo, Rect |
No Comments » |
Tags: entries, FXG, GradientEntry, Gumbo, LinearGradientStroke, Rect, stroke