Class org.aswing.GrayFilteredIcon

Implemented Interfaces

Icon

Description

GrayFilteredIcon use to filter a icon to be gray. Current this is just approximate effect, will be implement ture gray filter with flash 8ball new functions.

Field Index

DEFAULT_GRAY

Inherited from ComponentDecorator

Method Index

new GrayFilteredIcon()
createDecorateMC(), getIconHeight(), getIconWidth(), paintIcon(), uninstallIcon()

Inherited from ComponentDecorator

Constructor Detail

GrayFilteredIcon

public function GrayFilteredIcon(icon:Icon, gray:Number)

Create a gray filtered icon by given icon.

GrayFilterIcon(icon:Icon) gray by default.
GrayFilterIcon(icon:Icon, gray:Number)

Parameters

iconthe icon need to be filtered.
graythe gray value, in range [-100,-100], default is 50.

Field Detail

DEFAULT_GRAY

static public DEFAULT_GRAY:Number

Method Detail

getIconWidth

public function getIconWidth():Number

Return the icon's width.

Specified By

getIconWidth() in org.aswing.Icon

getIconHeight

public function getIconHeight():Number

Return the icon's height.

Specified By

getIconHeight() in org.aswing.Icon

createDecorateMC

public function createDecorateMC(c:Component):MovieClip

This method call super.createDecorateMC() to create the MC and then set gray transform to the MC.

paintIcon

public function paintIcon(com:Component, g:Graphics, x:Number, y:Number):Void

Description copied from Icon

Draw the icon at the specified component's specified location with the graphics. If this if the first time to paint on the specified component, there may need some install operation, for example create MC on the specified mc if needed.

Specified By

paintIcon() in org.aswing.Icon

uninstallIcon

public function uninstallIcon(com:Component):Void

Description copied from Icon

Remove things in the icon object related to the component. For example remove the MCs created at the first paint time.

There is not installIcon method, so you must install icon related things at the first time of paintIcon, for example attach a MC if needed.

Specified By

uninstallIcon() in org.aswing.Icon