<?xml version="1.0" encoding="utf-8"?>
<!-- RectExample.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
<s:Panel title="Rectangle Graphic Example"
width="75%" height="75%"
horizontalCenter="0" verticalCenter="0">
<s:Group left="10" right="10" top="10" bottom="10">
<!-- Draw rectangle with square corners. -->
<s:Graphic x="0" y="0">
<!--颜色填充-->
<s:Rect height="100" width="200">
<s:stroke>
<s:SolidColorStroke color="0x000000" weight="2"/>
</s:stroke>
<s:fill>
<s:RadialGradient>
<s:entries>
<s:GradientEntry color="0x0056FF" ratio="0.00" alpha="0.5"/>
</s:entries>
</s:RadialGradient>
</s:fill>
</s:Rect>
</s:Graphic>
<!-- Draw rectangle with rounded corners. -->
<s:Graphic x="250" y="0" alpha="0.5">
<!--渐变颜色填充-->
<s:Rect height="100" width="200" radiusX="25" radiusY="25" alpha="0.5">
<s:stroke>
<s:SolidColorStroke color="0x000000" weight="2"/>
</s:stroke>
<s:fill>
<s:RadialGradient>
<s:entries>
<s:GradientEntry color="0x0056FF" ratio="0.00" alpha="0.5"/>
<s:GradientEntry color="0x00CC99" ratio="0.33" alpha="0.5"/>
<s:GradientEntry color="0xECEC21" ratio="0.66" alpha="0.5"/>
</s:entries>
</s:RadialGradient>
</s:fill>
</s:Rect>
<!--图片填充-->
<s:Rect left="1" right="1" top="1" width="100%" topLeftRadiusX="5"
topRightRadiusX="5">
<s:fill>
<s:BitmapFill id="headerBackground" alpha="1"
fillMode="repeat" source="@Embed('skins/back.png')"/>
</s:fill>
</s:Rect>
<s:Rect left="1" right="1" top="31" height="1">
<s:fill>
<s:SolidColor color="0xC0C0C0" />
</s:fill>
</s:Rect>
</s:Graphic>
</s:Group>
</s:Panel>
</s:Application>