加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex 的融合blendMode使用

发布时间:2020-12-15 01:22:31 所属栏目:百科 来源:网络整理
导读:?在Flex4.5中实现的一个简单的例子: ?xml version="1.0" encoding="utf-8"? s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" ????? xmlns:s="library://ns.adobe.com/flex/spark" ????? xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"

?在Flex4.5中实现的一个简单的例子:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
????? xmlns:s="library://ns.adobe.com/flex/spark"
????? xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
?<fx:Declarations>
??<!-- 将非可视元素(例如服务、值对象)放在此处 -->
?</fx:Declarations>
?<mx:HBox? label="blendMode:">
??<s:ComboBox id="comboBox" selectedIndex="0">
???<s:dataProvider>
????<s:ArrayCollection>
?????<fx:String>{BlendMode.ADD}</fx:String>
?????<fx:String>{BlendMode.ALPHA}</fx:String>
?????<fx:String>{BlendMode.DARKEN}</fx:String>
?????<fx:String>{BlendMode.DIFFERENCE}</fx:String>
?????<fx:String>{BlendMode.ERASE}</fx:String>
?????<fx:String>{BlendMode.HARDLIGHT}</fx:String>
?????<fx:String>{BlendMode.INVERT}</fx:String>
?????<fx:String>{BlendMode.LAYER}</fx:String>
?????<fx:String>{BlendMode.LIGHTEN}</fx:String>
?????<fx:String>{BlendMode.MULTIPLY}</fx:String>
?????<fx:String>{BlendMode.NORMAL}</fx:String>
?????<fx:String>{BlendMode.OVERLAY}</fx:String>
?????<fx:String>{BlendMode.SCREEN}</fx:String>
?????<fx:String>{BlendMode.SHADER}</fx:String>
?????<fx:String>{BlendMode.SUBTRACT}</fx:String>
????</s:ArrayCollection>
???</s:dataProvider>
??</s:ComboBox>
?</mx:HBox>
?
?
?<s:Ellipse id="ellipse1"???? ???
????? width="100"
????? height="100"
????? horizontalCenter="-25"
????? verticalCenter="-25">
??<s:fill>
???<s:SolidColor color="red" />
??</s:fill>
?</s:Ellipse>
?
?<s:Ellipse id="ellipse2"
????? width="100"
????? height="100"
????? horizontalCenter="25"
????? verticalCenter="-25">
??<s:fill>
???<s:SolidColor color="blue" />
??</s:fill>
?</s:Ellipse>
?<s:HGroup id="e3" width="100" height="100" horizontalCenter="0" verticalCenter="25">
??<s:Ellipse id="ellipse3"
?????? blendMode="{comboBox.selectedItem}"
?????? width="100"
?????? height="100"
?????? horizontalCenter="0"
?????? verticalCenter="25">
???<s:fill>
????<s:SolidColor color="green" />
???</s:fill>
??</s:Ellipse>
?</s:HGroup>?
?
?
</s:Application>
效果:
add:

darken:

还有很多,自己去试试吧....?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读