Flex Gumbo中如何通过smooth属性设置BitmapGraphic对象平滑度的例子

By Minidxer | June 8, 2009

接下来的例子演示了Flex Gumbo中如何通过smooth属性,设置BitmapGraphic对象平滑度。

让我们先来看一下Demo可以右键View Source或点击这里察看源代码):


下面是完整代码(或点击这里察看):

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Application name="BitmapGraphic_smooth_test"
  3.         xmlns="http://ns.adobe.com/mxml/2009"
  4.         layout="vertical"
  5.         verticalAlign="middle"
  6.         backgroundColor="white">
  7.  
  8.     <ApplicationControlBar dock="true">
  9.         <Form styleName="plain">
  10.             <FormItem label="smooth:">
  11.                 <CheckBox id="checkBox" />
  12.             </FormItem>
  13.             <FormItem label="rotation:">
  14.                 <HSlider id="slider"
  15.                         minimum="0"
  16.                         maximum="360"
  17.                         snapInterval="1"
  18.                         tickInterval="15"
  19.                         liveDragging="true" />
  20.             </FormItem>
  21.         </Form>
  22.     </ApplicationControlBar>
  23.  
  24.     <Graphic>
  25.         <BitmapGraphic id="bitmapGraphic"
  26.                 source="@Embed('assets/fx_appicon-tn.gif')"
  27.                 rotation="{slider.value}"
  28.                 smooth="{checkBox.selected}" />
  29.     </Graphic>
  30.  
  31. </Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子

Topics: BitmapGraphic, Gumbo | No Comments » | 1,098 views Tags: , , ,

Search Posts