BlendMode.DIFFERENCE, BlendMode.ERASE, BlendMode.HARDLIGHT, BlendMode.INVERT : Image Blend « Graphics « Flex






BlendMode.DIFFERENCE, BlendMode.ERASE, BlendMode.HARDLIGHT, BlendMode.INVERT

BlendMode.DIFFERENCE, BlendMode.ERASE, BlendMode.HARDLIGHT, BlendMode.INVERT
            


<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    <mx:Canvas width="800" height="800">
        <mx:Script>
            
                import flash.display.BlendMode;
          
        </mx:Script>
        <mx:Image id="img1" source="a.jpg"/>
        <mx:Image id="img2" source="a.jpg"/>
        <mx:HBox>
            <mx:CheckBox id="chb" label="which one"/>
            <mx:ComboBox id="cb" dataProvider="{[BlendMode.DIFFERENCE, BlendMode.ERASE, BlendMode.HARDLIGHT, BlendMode.INVERT]}"
             change="chb.selected ? img1.blendMode = cb.selectedItem as String : img2.blendMode = cb.selectedItem as String"/>
        </mx:HBox>
    </mx:Canvas>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.BlendMode.LAYER, BlendMode.LIGHTEN, BlendMode.MULTIPLY, BlendMode.NORMALBlendMode.LAYER, BlendMode.LIGHTEN, BlendMode.MULTIPLY, BlendMode.NORMAL
2.BlendMode.OVERLAY, BlendMode.SCREEN, BlendMode.SUBTRACTBlendMode.OVERLAY, BlendMode.SCREEN, BlendMode.SUBTRACT
3.Blend ModesBlend Modes
4.Use Blend Modes with Multiple ImagesUse Blend Modes with Multiple Images