<s:GradientBevelFilter>
tag inherits all of the tag
attributes of its superclass and adds no tag attributes:
<s:GradientBevelFilter/>]]>
滤镜的具体使用取决于要应用滤镜的对象:
如果对显示对象应用滤镜,显示对象的
此滤镜支持舞台缩放。但是,它不支持常规缩放、旋转和倾斜;如果对象本身进行了缩放(如果将
如果所得图像超过最大尺寸,则不应用滤镜。在 AIR 1.5 和 Flash Player 10 中,最大宽度或高度为 8,191 像素,并且像素总数不能超过 16,777,215 像素。(因此,如果图像的宽度为 8,191 像素,则其高度只能为 2,048 像素。)例如,如果在放大某大型影片剪辑时应用了滤镜,则所得图像超过最大尺寸时,将关闭该滤镜。
有关详细信息,请参阅
<s:DropShadowFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:DropShadowFilter Properties alpha="1" angle="45" color="0xFF0000" distance="4" hideObject="false" inner="false" />]]>
滤镜的具体使用取决于要应用滤镜的对象:
如果对显示对象应用滤镜,则该显示对象的
此滤镜支持舞台缩放。但是,它不支持常规缩放、旋转和倾斜。如果对象本身进行了缩放(如果将
如果所得图像超过最大尺寸,则不应用滤镜。在 AIR 1.5 和 Flash Player 10 中,最大宽度或高度为 8,191 像素,并且像素总数不能超过 16,777,215 像素。(因此,如果图像的宽度为 8,191 像素,则其高度只能为 2,048 像素。)例如,如果在放大某大型影片剪辑时应用了滤镜,则所得图像超过最大尺寸时,将关闭该滤镜。
有关这些值的详细信息,请参阅
<s:ConvolutionFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:ConvolutionFilter Properties alpha="1" clamp="true" color="0xFF0000" divisor="1.0" matrix="[]" matrixX="0" matrixY="0" preserveAlpha="true" />]]>
要创建卷积滤镜,请使用语法
如果对显示对象应用滤镜,则该对象的
如果所得图像超过最大尺寸,则不应用滤镜。在 AIR 1.5 和 Flash Player 10 中,最大宽度或高度为 8,191 像素,并且像素总数不能超过 16,777,215 像素。(因此,如果图像的宽度为 8,191 像素,则其高度只能为 2,048 像素。)例如,如果在放大某大型影片剪辑时应用了滤镜,则所得图像超过最大尺寸时,将关闭该滤镜。
<s:BlurFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:BlurFilter Properties blurX="4.0" blurY="4.0" quality="low" />]]>
要创建新的滤镜,请使用构造函数
如果对显示对象应用滤镜,显示对象的
此滤镜支持舞台缩放。但是,它不支持常规缩放、旋转和倾斜。如果对象本身进行了缩放(
如果所得图像超过最大尺寸,则不应用滤镜。在 AIR 1.5 和 Flash Player 10 中,最大宽度或高度为 8,191 像素,并且像素总数不能超过 16,777,215 像素。(因此,如果图像的宽度为 8,191 像素,则其高度只能为 2,048 像素。)例如,如果在放大某大型影片剪辑时应用了滤镜,则所得图像超过最大尺寸时,将关闭该滤镜。
高品质接近高斯模糊。对于大多数应用,这三个值已足够了。虽然您可以使用不超过 15 的其它数值来达到不同的效果,但是请注意,值越高,呈现速度越慢。
对于大多数应用,quality 的值为低、中或高就足够了。您可以使用其他数值(最高为 15)来达到不同的效果,但是值越高,呈示速度越慢。除了增加 quality 的值,仅增加
<s:ColorMatrixFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:ColorMatrixFilter Properties matrix="[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]" />]]>
该值必须为 20 个数字组成的数组或以逗号分隔的字符串。
<s:GradientFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:GradientFilter Properties angle="45" distance="4.0" entries="[]" type="inner" />]]>
<s:BevelFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:BevelFilter Properties angle="45" distance="4" highlightAlpha="1" highlightColor="0xFFFFFF" shadowAlpha="1" shadowColor="0x000000" type="inner" />]]>
要创建新滤镜,请使用构造函数
如果对显示对象应用滤镜,则该对象的
此滤镜支持舞台缩放。但是,它不支持常规缩放、旋转和倾斜。如果对象本身进行了缩放(如果
如果所得图像超过最大尺寸,则不应用滤镜。在 AIR 1.5 和 Flash Player 10 中,最大宽度或高度为 8,191 像素,并且像素总数不能超过 16,777,215 像素。(因此,如果图像的宽度为 8,191 像素,则其高度只能为 2,048 像素。)例如,如果在放大某大型影片剪辑时应用了滤镜,则所得图像超过最大尺寸时,将关闭该滤镜。
这些值越低,滤镜的呈现速度就越快。可以使用其它可用的数值来实现不同的效果。
<s:GradientGlowFilter>
tag inherits all of the tag
attributes of its superclass and adds no tag attributes:
<s:GradientGlowFilter/>]]>
滤镜的具体使用取决于要应用滤镜的对象:
如果对显示对象应用滤镜,显示对象的
此滤镜支持舞台缩放。但是,它不支持常规缩放、旋转和倾斜;如果对象本身进行了缩放(如果将
如果所得图像超过最大尺寸,则不应用滤镜。在 AIR 1.5 和 Flash Player 10 中,最大宽度或高度为 8,191 像素,并且像素总数不能超过 16,777,215 像素。(因此,如果图像的宽度为 8,191 像素,则其高度只能为 2,048 像素。)例如,如果在放大某大型影片剪辑时应用了滤镜,则所得图像超过最大尺寸时,将关闭该滤镜。
有关详细信息,请参阅
<s:DisplacementMapFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:DisplacementMapFilter Properties alpha="0" color="0x000000" componentX="0" componentY="0" mapBitmap="null" mapPoint="null" mode="wrap" scaleX="0" scaleY="0" />]]>
滤镜的具体使用取决于要应用滤镜的对象:
如果对显示对象应用滤镜,则该显示对象的
此滤镜使用以下公式:
其中,
滤镜使用的映射图像会进行缩放,以匹配舞台缩放比例。当对象自身呈一定的比例时,它不会进行缩放。
此滤镜支持舞台缩放。但不支持常规缩放、旋转和倾斜。如果对象本身进行了缩放(如果将
<s:ShaderFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:ShaderFilter Properties bottomExtension="0" leftExtension="0" precisionHint="full" rightExtension="0" shader="[]" topExtension="0" />]]>
ShaderFilter 类必须使用 Shader 对象的实例或者 Shader 的 Class 代理(例如来自 Embed)来初始化。这样,ShaderFilter 类就会充当基础 Shader 的代理,提供一种方便的机制,将标量和多维着色器输入参数都作为简单命名的属性直接访问。
要设置简单标量着色器输入参数(例如类型为 FLOAT 或 INT 的此类参数),可以直接引用属性,如
要设置多维着色器输入参数(如 FLOAT2)的各个组件或设置其动画,可以使用属性后缀约定直接访问各个值。以下代码显示设置 FLOAT2 属性
// 'center' is an input parameter of type FLOAT2.
shader.center = [10,20];
// Use property suffix convention to access the first and second component of 'center'.
shader.center_x = 10;
shader.center_y = 20;
可以使用的支持的属性后缀的全集如下所示:
随着 ShaderFilter 上属性的更改(例如在动画过程中),ShaderFilter 会自动将其自身重新应用于它所应用的可视组件的滤镜数组。
<s:GlowFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:GlowFilter Properties alpha="1" color="0xFF0000" inner="false" />]]>
滤镜的具体使用取决于要应用滤镜的对象:
如果对显示对象应用滤镜,显示对象的
此滤镜支持舞台缩放。但是,它不支持常规缩放、旋转和倾斜。如果对象本身进行了缩放(如果将
如果所得图像超过最大尺寸,则不应用滤镜。在 AIR 1.5 和 Flash Player 10 中,最大宽度或高度为 8,191 像素,并且像素总数不能超过 16,777,215 像素。(因此,如果图像的宽度为 8,191 像素,则其高度只能为 2,048 像素。)例如,如果在放大某大型影片剪辑时应用了滤镜,则所得图像超过最大尺寸时,将关闭该滤镜。
有关详细信息,请参阅