flex4에서 BitmapFill 사용
2075 단어 bitmap
private function getBorderBackground(url:String):void
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, handleLoadComplete);
loader.load( new URLRequest(url) );
}
private function handleLoadComplete( evt:Event ):void
{
var bmp:Bitmap = ( evt.target as LoaderInfo ).content as Bitmap;
bgImage.source = bmp;
}
<s:Rect>
<s:fill>
<s:BitmapFill id="bgImage" fillMode="{BitmapFillMode.REPEAT}" rotation="-45" />
</s:fill>
</s:Rect>
Flex 4에서 BitmapFill과 LinearGradient를 통해 패널에 비트맵을 배경색으로 채우는 방법
<s:Panel id="pnl"
title="Spark Panel title"
width="320" height="240"
horizontalCenter="0" verticalCenter="0">
<s:Rect width="100%" height="100%">
<s:fill>
<s:BitmapFill source="@Embed('assets/pattern_140.gif')" />
</s:fill>
</s:Rect>
<s:Rect width="100%" height="100%">
<s:fill>
<s:LinearGradient rotation="{rotationSlider.value}">
<s:GradientEntry color="white"
alpha="0.0"
ratio="0.0" />
<s:GradientEntry color="#F0EBD2"
alpha="1.0"
ratio="{ratioSlider.value}" />
</s:LinearGradient>
</s:fill>
</s:Rect>
<s:TextArea id="textArea"
verticalScrollPolicy="on"
left="20" right="20"
top="20" bottom="20">
<s:text>The quick brown fox jumps over the lazy dog.</s:text>
</s:TextArea>
</s:Panel>
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
cacheasBitmap 연구true으로 설정하면 Flash가 실행될 때 객체의 내부 비트맵 표현이 캐시됩니다.이 캐시는 복잡한 벡터 내용을 포함하는 디스플레이 대상의 성능을 향상시킬 수 있습니다. 캐시된 비트맵이 있는 표시 대상의 모든 벡터 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.