Flex Gumbo中如何通过miterLimit属性设置Path stroke的例子
By Minidxer | June 23, 2009
接下来的例子演示了Flex Gumbo中如何通过miterLimit属性,设置Path stroke。
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <Application name="Path_stroke_miterLimit_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="miterLimit:">
- <HSlider id="slider"
- minimum="0"
- maximum="10"
- value="0"
- tickInterval="1"
- liveDragging="true" />
- </FormItem>
- </Form>
- </ApplicationControlBar>
- <Graphic>
- <Path id="path" data="{pathData}">
- <stroke>
- <SolidColorStroke id="pathStroke"
- joints="miter"
- miterLimit="{slider.value}"
- color="red"
- weight="40" />
- </stroke>
- </Path>
- <Path data="{pathData}">
- <stroke>
- <SolidColorStroke
- color="black"
- weight="1" />
- </stroke>
- </Path>
- </Graphic>
- </Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
Gumbo, Other |
No Comments » |
Tags: Gumbo, joints, miterLimit, Path, SolidColorStroke, stroke