Differences between revisions 9 and 10
Revision 9 as of 2008-09-06 11:55:34
Size: 2014
Editor: klaus
Comment:
Revision 10 as of 2008-09-06 12:09:23
Size: 2016
Editor: klaus
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
- The filter is applied on the alpha channel. The result is the shadow pane.

- The angle is measure in radians, 0 means right side of the object.

- The distance is measured in pixels.
 
  * Possible composition flags:
    * FILTER_MODE_INNER (inner shadow, outer shadow is default)
    * FILTER_MODE_KO (knock out mode)
  
- The composite pixels are the result of multiplying the provided filter color and the shadow pane pixels.

See also BlurFilter.
Line 2: Line 16:
Line 17: Line 32:

- The filter is applied on the alpha channel. The result is the shadow pane.

- The angle is measure in radians, 0 means right side of the object.

- The distance is measured in pixels.
 
  * Possible composition flags:
    * FILTER_MODE_INNER (inner shadow, outer shadow is default)
    * FILTER_MODE_KO (knock out mode)
  
- The composite pixels are the result of multiplying the provided filter color and the shadow pane pixels.

See also BlurFilter.

- The filter is applied on the alpha channel. The result is the shadow pane.

- The angle is measure in radians, 0 means right side of the object.

- The distance is measured in pixels.

  • Possible composition flags:
    • FILTER_MODE_INNER (inner shadow, outer shadow is default)
    • FILTER_MODE_KO (knock out mode)

- The composite pixels are the result of multiplying the provided filter color and the shadow pane pixels.

See also BlurFilter.

C

SWFFilter newDropShadowFilter(SWFColor color /* color of shadow */, 
                              SWFBlur blur /* blur */, 
                              SWFShadow shadow /* shadow */, 
                              int flags /* FILTER_MODE_INNER,  FILTER_MODE_KO */)

SWFBlur newSWFBlur(float blurX /* horiz. blur amount */, 
                   float blurY /* vert. blur amount */, 
                   int passes /* number of passes. shoub be <= 3 */)

SWFShadow newSWFShadow(float angle /* angle in radians */, 
                       float distance /* distance in px*/, 
                       float strength /* strength */)

Example

SWFBlur blur;
SWFFilter f;
SWFShadow shadow;
SWFColor c;

blur = newSWFBlur(5,5,2);
shadow = newSWFShadow(0.79, 5, 1);
c.red = 0;
c.green = 0;
c.blue = 0;
c.alpha = 0xff;

f = newDropShadowFilter(c, blur, shadow, FILTER_MODE_INNER | FILTER_MODE_KO);

/* ... */

// attach filter to DisplayItem
// display item must be a MovieClip, Button or TextField instance
SWFDisplayItem_addFilter(item, f);

/* ... */

PHP

libming: DropShadowFilter (last edited 2009-06-25 03:09:41 by localhost)