flash.display

# GraphicsShaderFill - AS3

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

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.

Related API Elements

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
|  | 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
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | 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`

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):

Copy

         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

flash.geom.Matrix

### 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

flash.display.Shader
Constructor Detail

### 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.

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.

Related API Elements

flash.geom.Matrix
flash.display.Shader

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00