API Docs for: 1.10.1 最后更新日期:2016年03月28日
Google搜索   
Show:

LDropShadowFilter Class

Extends LObject

Available since 1.6.0

可使用 DropShadowFilter 类向显示对象添加投影。阴影算法基于模糊滤镜使用的同一个框型滤镜。投影样式有多个选项,包括内侧或外侧阴影和挖空模式。您可以将滤镜应用于任何显示对象(即,从 DisplayObject 类继承的对象)。

Constructor

LDropShadowFilter

(
  • distance
  • angle
  • color
  • blur
)
public

Defined in filters/LDropShadowFilter.js:1

Available since 1.6.0

Parameters:

  • distance Int

    阴影的偏移距离,以像素为单位。

  • angle Int

    阴影的角度。

  • color Int

    阴影的颜色。

  • blur Int

    模糊量。

Example:

var bitmapdata = new LBitmapData(event.target);  
var bitmap = new LBitmap(bitmapdata);
addChild(bitmap);
var shadow = new LDropShadowFilter(5,45,"#000000");
bitmap.filters = [shadow];

Item Index

Properties

Methods

callParent

(
  • functionName
  • arguments
)
public

Inherited from LObject: utils/LObject.js:22

Available since 1.6.0

调用父类的函数。

Parameters:

  • functionName String

    函数名

  • arguments Array

    固定值arguments

Example:

function funA(){
    LExtends(this,LObject,[]);
}
funA.prototype.myName = function(){
    return "AAA";
}
function funB(){
    LExtends(this,funA,[]);
}
funB.prototype.myName = function(){
    return "BBB";
}
function funC(){
    LExtends(this,funA,[]);
}
funC.prototype.myName = function(){
    return this.callParent("myName",arguments);
}
LInit(1000/50,"legend",800,150,main);
function main(){
    LGlobal.setDebug(true);
    var objB = new funB();
    trace(objB.myName());//BBB
    var objC = new funC();
    trace(objC.myName());//AAA
}

setAngle

(
  • angle
)
public

Defined in filters/LDropShadowFilter.js:57

Available since 1.6.0

设定阴影的角度

Parameters:

  • angle Int

    阴影的角度。

setBlur

(
  • blur
)
public

Defined in filters/LDropShadowFilter.js:78

Available since 1.6.0

设定模糊量

Parameters:

  • blur Int

    模糊量。

setColor

(
  • color
)
public

Defined in filters/LDropShadowFilter.js:68

Available since 1.6.0

设定阴影的颜色

Parameters:

  • color Int

    阴影的颜色。

setDistance

(
  • distance
)
public

Defined in filters/LDropShadowFilter.js:46

Available since 1.6.0

设定阴影的偏移距离

Parameters:

  • distance Int

    阴影的偏移距离。

Properties

objectIndex

Int public

Inherited from LObject: utils/LObject.js:11

Available since 1.6.0

对象的ID