Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
flash.display 
GraphicsShaderFill 
Packageflash.display
Classpublic final class GraphicsShaderFill
InheritanceGraphicsShaderFill Inheritance Object
Implements IGraphicsFill, IGraphicsData

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Defines a shader fill.

Use a GraphicsShaderFill object with the Graphics.drawGraphicsData() method. Drawing a GraphicsShaderFill object is the equivalent of calling the Graphics.beginShaderFill() method.

See also



Public Properties
 PropertyDefined By
 Inheritedconstructor : 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
 Inheritedprototype : 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
 MethodDefined By
  
GraphicsShaderFill(shader:Shader = null, matrix:Matrix = null)
Creates a new GraphicsShaderFill object.
GraphicsShaderFill
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

matrix

property
public var matrix:Matrix

Runtime Versions: Flash Player 10, AIR 1.5

A matrix object (of the flash.geom.Matrix class), which you can use to define transformations on the shader. For example, 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

shader

property 
public var shader:Shader

Runtime Versions: Flash Player 10, AIR 1.5

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

Constructor Detail

GraphicsShaderFill

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

Runtime Versions: Flash Player 10, AIR 1.5

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