Flex Gumbo中如何通过joints属性设置SolidColorStroke对象连接(join)样式的例子
By Minidxer | June 19, 2009
接下来的例子演示了Flex Gumbo中如何通过joints属性设置flash.display.JointStyle类,设置SolidColorStroke对象连接(join)样式。
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <Application name="Path_stroke_joints_test"
- xmlns="http://ns.adobe.com/mxml/2009"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <Declarations>
- <String id="pathData">M 0 0 L 200 0 L 0 80 Z</String>
- </Declarations>
- <ApplicationControlBar dock="true">
- <Form styleName="plain">
- <FormItem label="joints:">
- <ComboBox id="comboBox"
- dataProvider="[bevel,miter,round]" />
- </FormItem>
- </Form>
- </ApplicationControlBar>
- <Graphic>
- <Path id="path" data="{pathData}">
- <stroke>
- <SolidColorStroke id="pathStroke"
- joints="{comboBox.selectedItem}"
- color="red"
- weight="40" />
- </stroke>
- </Path>
- <Path data="{pathData}">
- <stroke>
- <SolidColorStroke
- color="black"
- weight="1" />
- </stroke>
- </Path>
- </Graphic>
- </Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
Gumbo, SolidColorStroke |
No Comments » |
Tags: Gumbo, joints, JointStyle, Path, SolidColorStroke, stroke