<?xml version="1.0" encoding="utf-8"?>
<!--
/* 
 * $Id: ImageRotate.mxml 166 2009-07-06 00:40:35Z danielr $
 * 
 * Copyright (c) 2009 Daniel Rinehart
 * http://danielr.neophi.com/
 * 
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
-->
<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/halo" viewSourceURL="srcview/index.html">
    <mx:Image id="image" source="YellowFlowers.png" verticalCenter="0" horizontalCenter="0">
        <mx:filters>
            <s:ShaderFilter shader="@Embed(source='ImageRotate.pbj')" origin_x="{originX.value}" origin_y="{originY.value}" rotation="{rotationD.value}"
                            bottomExtension="{extension.value}" topExtension="{extension.value}" leftExtension="{extension.value}" rightExtension="{extension.value}"/>
        </mx:filters>
    </mx:Image>
    <s:VGroup x="10" y="10">
        <mx:Label text="Rotation Degrees"/>
        <s:HSlider id="rotationD" minimum="-180" maximum="180" stepSize="1" valueInterval="1" liveDragging="true"/>
        <mx:Label text="Rotation Origin (x, y)"/>
        <s:HSlider id="originX" minimum="0" maximum="{image.width}" stepSize="1" valueInterval="1" liveDragging="true"/>
        <s:HSlider id="originY" minimum="0" maximum="{image.height}" stepSize="1" valueInterval="1" liveDragging="true"/>
        <mx:Label text="Extension"/>
        <s:HSlider id="extension" minimum="0" maximum="{image.width}" stepSize="1" valueInterval="1" liveDragging="true"/>
    </s:VGroup>
</s:Application>