flex4中 圆、矩形、线、图的显示实例
<?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/halo"
width="100%" height="100%">
<fx:Script>
<![CDATA[
import mx.graphics.SolidColorStroke;
private const _scs:SolidColorStroke=new SolidColorStroke(0x000000,5,1.0);
]]>
</fx:Script>
<s:Panel width="100%" height="100%" title="Primitives!">
<s:Ellipse x="12" y="39" width="50" height="40" stroke="{_scs}"/>
<s:Rect x="127" y="40" width="50" height="40" stroke="{_scs}"/>
<s:Line xFrom="90" yFrom="80" xTo="60" yTo="140" stroke="{_scs}"/>
<s:Path data="M30 168L132 186 162 144 50 165" stroke="{_scs}"/>
<s:Label text="In session 16 we' take this further!" x="190" y="130" rotation="-30"/>
<s:RichText textRotation="rotate90" fontWeight="bold" text="HELLO WORLD"/>
<s:RichEditableText text="(select and type!)" x="260" y="120"/>
<s:BitmapImage x="221" y="145" source="@Embed('28.png')"/>
</s:Panel>
</s:Application>