Flex Gumbo中如何利用blendMode属性给Ellipse对象设置融合模式的例子
By Minidxer | May 28, 2009
接下来的例子演示了Flex Gumbo中如何利用blendMode属性,给Ellipse对象设置融合模式。
让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <FxApplication name="Ellipse_blendMode_test"
- xmlns="http://ns.adobe.com/mxml/2009">
- <Form>
- <FormItem label="blendMode:">
- <ComboBox id="comboBox">
- <dataProvider>
- <String>{BlendMode.ADD}</String>
- <String>{BlendMode.ALPHA}</String>
- <String>{BlendMode.DARKEN}</String>
- <String>{BlendMode.DIFFERENCE}</String>
- <String>{BlendMode.ERASE}</String>
- <String>{BlendMode.HARDLIGHT}</String>
- <String>{BlendMode.INVERT}</String>
- <String>{BlendMode.LAYER}</String>
- <String>{BlendMode.LIGHTEN}</String>
- <String>{BlendMode.MULTIPLY}</String>
- <String>{BlendMode.NORMAL}</String>
- <String>{BlendMode.OVERLAY}</String>
- <String>{BlendMode.SCREEN}</String>
- <String>{BlendMode.SHADER}</String>
- <String>{BlendMode.SUBTRACT}</String>
- </dataProvider>
- </ComboBox>
- </FormItem>
- </Form>
- <Ellipse id="ellipse1"
- width="100"
- height="100"
- horizontalCenter="-25"
- verticalCenter="-25">
- <fill>
- <SolidColor color="red" />
- </fill>
- </Ellipse>
- <Ellipse id="ellipse2"
- width="100"
- height="100"
- horizontalCenter="25"
- verticalCenter="-25">
- <fill>
- <SolidColor color="blue" />
- </fill>
- </Ellipse>
- <Ellipse id="ellipse3"
- blendMode="{comboBox.selectedItem}"
- width="100"
- height="100"
- horizontalCenter="0"
- verticalCenter="25">
- <fill>
- <SolidColor color="green" />
- </fill>
- </Ellipse>
- </FxApplication>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
Ellipse, Gumbo |
No Comments » |
Tags: blendMode, Ellipse, Gumbo