Flex Gumbo中如何通过joints属性设置LinearGradientStroke对象连接样式(joint style)的例子
By Minidxer | June 16, 2009
接下来的例子演示了Flex Gumbo中如何通过joints属性,设置LinearGradientStroke对象连接样式。
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <Application name="LinearGradientStroke_joints_test"
- xmlns="http://ns.adobe.com/mxml/2009"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <ApplicationControlBar dock="true">
- <Form styleName="plain">
- <FormItem label="joints:">
- <ComboBox id="comboBox"
- dataProvider="[bevel,miter,round]" />
- </FormItem>
- </Form>
- </ApplicationControlBar>
- <Graphic>
- <Rect id="rect" width="300" height="200">
- <stroke>
- <LinearGradientStroke id="linearGrad"
- joints="{comboBox.selectedItem}"
- weight="20">
- <entries>
- <GradientEntry color="red" />
- <GradientEntry color="white" />
- <GradientEntry color="blue" />
- </entries>
- </LinearGradientStroke>
- </stroke>
- </Rect>
- </Graphic>
- </Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
Gumbo, LinearGradientStroke |
No Comments » |
Tags: Gumbo, joints, JointStyle, LinearGradientStroke, Rect, stroke