Show:

annie.BlurFilter Class

Extends annie.AOjbect
Defined in: libs/Filters.js:486
Module: annie

Available since 1.0.0

小游戏不支持 小程序不支持

模糊滤镜

Item Index

Properties

Methods

BlurFilter

(
  • blurX
  • blurY
  • quality
)
public

Defined in libs/Filters.js:496

Available since 1.0.0

小游戏不支持 小程序不支持

Parameters:

Example:

 var imgEle = new Image();
      imgEle.onload = function (e) {
  var rect = new annie.Rectangle(0, 0, 200, 200),
      rectBitmap = new annie.Bitmap(imgEle, rect);
      rectBitmap.x = (s.stage.desWidth - bitmap.width) / 2;
      rectBitmap.y = (s.stage.desHeight - bitmap.height) / 2;
      var blur=new annie.BlurFilter(30,30,1);//实例化模糊滤镜
      rectBitmap.filters=[blur];//为bitmap添加模糊滤镜效果
      s.addChild(rectBitmap);
  }
  imgEle.src = 'http://test.annie2x.com/biglong/logo.jpg';

drawFilter

(
  • imageData
)
public

Defined in libs/Filters.js:576

Available since 1.0.0

绘画滤镜效果

Parameters:

toString

() String public

Defined in libs/Filters.js:565

Available since 1.0.0

获取滤镜的字符串表现形式以方便比较两个滤镜是否效果一样

Returns:

Properties

blurX

Number public

Defined in libs/Filters.js:531

Available since 1.0.0

水平模糊量

blurY

Number public

Defined in libs/Filters.js:540

Available since 1.0.0

垂直模糊量

quality

Number public

Defined in libs/Filters.js:549

Available since 1.0.0

模糊品质

type

String public

Defined in libs/Filters.js:522

Available since 1.0.0

滤镜类型 只读