ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
GraphicsShaderFill

Package | flash.display
Class | public final class GraphicsShaderFill
Inheritance | GraphicsShaderFill Object
Implements | IGraphicsFill, IGraphicsData

Defines a shader fill.

A GraphicsShaderFill object can be used with the `Graphics.drawGraphicsData()` method. when this object is drawn it is the equivalent of calling the `Graphics.beginShaderFill()` method.

See also

flash.display.Graphics.beginShaderFill()
flash.display.Graphics.drawGraphicsData()

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | matrix : Matrix A matrix object (of the flash.geom.Matrix class), which you can use to define transformations on the shader. | GraphicsShaderFill
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object
|  | shader : Shader The shader to use for the fill. | GraphicsShaderFill

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | GraphicsShaderFill(shader:Shader = null, matrix:Matrix = null) Creates a new GraphicsShaderFill object. | GraphicsShaderFill
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

matrix | property

`public var matrix:Matrix`

A matrix object (of the flash.geom.Matrix class), which you can use to define transformations on the shader. For instance, you can use the following matrix to rotate a shader by 45 degrees (pi/4 radians):

         matrix = new flash.geom.Matrix();
         matrix.rotate(Math.PI / 4);

The coordinates received in the shader are based on the matrix that is specified for the `matrix` parameter. For a default (`null`) matrix, the coordinates in the shader are local pixel coordinates which can be used to sample an input.

See also

flash.geom.Matrix

shader | property |

`public var shader:Shader`

The shader to use for the fill. This Shader instance is not required to specify an image input. However, if an image input is specified in the shader, the input must be provided manually by setting the `input` property of the corresponding ShaderInput property of the `Shader.data` property.

When you pass a Shader instance as an argument the shader is copied internally and the drawing fill operation uses that internal copy, not a reference to the original shader. Any changes made to the shader, such as changing a parameter value, input, or bytecode, are not applied to the copied shader that's used for the fill.

See also

flash.display.Shader
Constructor Detail

GraphicsShaderFill | () | Constructor

`public function GraphicsShaderFill(shader:Shader = null, matrix:Matrix = null)`

Creates a new GraphicsShaderFill object.

Parameters

| `shader:Shader` (default = `null`)`` — The shader to use for the fill. This Shader instance is not required to specify an image input. However, if an image input is specified in the shader, the input must be provided manually by setting the `input` property of the corresponding ShaderInput property of the `Shader.data` property.
| `matrix:Matrix` (default = `null`)`` — A matrix object (of the flash.geom.Matrix class), which you can use to define transformations on the shader.

See also

flash.geom.Matrix
flash.display.Shader

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:02 AM -07:00