Package | flash.display |
Class | public final class GraphicsShaderFill |
Inheritance | GraphicsShaderFill Object |
Implements | IGraphicsFill, IGraphicsData |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Use a GraphicsShaderFill object with the Graphics.drawGraphicsData()
method.
Drawing a GraphicsShaderFill object is the equivalent of calling the Graphics.beginShaderFill()
method.
Related API Elements
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 | ||
shader : Shader
The shader to use for the fill. | GraphicsShaderFill |
Method | Defined By | ||
---|---|---|---|
Creates a new GraphicsShaderFill object. | GraphicsShaderFill | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
matrix | property |
public var matrix:Matrix
Language Version: | ActionScript 3.0 |
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.
Related API Elements
shader | property |
public var shader:Shader
Language Version: | ActionScript 3.0 |
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.
Related API Elements
GraphicsShaderFill | () | Constructor |
public function GraphicsShaderFill(shader:Shader = null, matrix:Matrix = null)
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Creates a new GraphicsShaderFill object.
Parametersshader: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.
|
Related API Elements
Thu Dec 6 2018, 01:12 PM -08:00