<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright 2010 Chet Haase
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
    http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark"
               gap="0">
    <fx:Declarations>
        <s:BlurFilter id="blur" blurX="5" blurY="5" quality="2"/>
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            [Bindable]public var source:Object;
            [Bindable]public var imageWidth:Object;
            [Bindable]public var imageHeight:Object;
        ]]>
    </fx:Script>
    <s:BitmapImage id="image" source="{source}" smooth="true" 
                   width="{imageWidth}" height="{imageHeight}"/>
    <s:BitmapImage source="{source}" smooth="true" 
           width="{image.width}" height="{image.height}" 
           maskType="alpha" scaleY="-1" id="reflection" 
           filters="{[blur]}">
        <s:mask>
            <s:Group>
                <s:Rect width="{image.width}" height="{image.height}">
                    <s:fill>
                        <s:LinearGradient rotation="-90">
                            <s:GradientEntry color="white" alpha="1"/>
                            <s:GradientEntry color="white" alpha="0" ratio=".4"/>
                        </s:LinearGradient>
                    </s:fill>
                </s:Rect>
            </s:Group>
        </s:mask>
    </s:BitmapImage>
</s:VGroup>