加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex Rect用法

发布时间:2020-12-15 03:57:34 所属栏目:百科 来源:网络整理
导读:?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%" horizontalCente
<?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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读