starling-framework
Version:
A fast, productive library for 2D cross-platform development.
80 lines • 2.27 kB
TypeScript
import Texture from "../textures/Texture";
import IFilterHelper from "./IFilterHelper";
import DisplayObject from "../display/DisplayObject";
import Rectangle from "openfl/geom/Rectangle";
import Matrix3D from "openfl/geom/Matrix3D";
declare namespace starling.filters {
/**
* @private
* *
* * This class manages texture creation, pooling and disposal of all textures
* * during filter processing.
*
*/
export class FilterHelper implements IFilterHelper {
/**
* Creates a new, empty instance.
*/
constructor(textureFormat?: string);
/**
* Purges the pool.
*/
dispose(): void;
/**
* Starts a new round of rendering. If <code>numPasses</code> is greater than zero, each
* * <code>getTexture()</code> call will be counted as one pass; the final pass will then
* * return <code>null</code> instead of a texture, to indicate that this pass should be
* * rendered to the back buffer.
*
*/
start(numPasses: number, drawLastPassToBackBuffer: boolean): void;
/**
* @inheritDoc
*/
getTexture(resolution?: number): Texture;
/**
* @inheritDoc
*/
putTexture(texture: Texture): void;
/**
* Purges the pool and disposes all textures.
*/
purge(): void;
/**
* The projection matrix that was active when the filter started processing.
*/
get projectionMatrix3D(): Matrix3D;
set projectionMatrix3D(value: Matrix3D)
/**
* The render target that was active when the filter started processing.
*/
get renderTarget(): Texture;
set renderTarget(value: Texture)
/**
* The clipping rectangle that was active when the filter started processing.
*/
get clipRect(): Rectangle;
set clipRect(value: Rectangle)
/**
* @inheritDoc
*/
get targetBounds(): Rectangle;
set targetBounds(value: Rectangle)
/**
* @inheritDoc
*/
get target(): DisplayObject;
set target(value: DisplayObject)
/**
* The scale factor of the returned textures.
*/
get textureScale(): number;
set textureScale(value: number)
/**
* The texture format of the returned textures. @default BGRA
*/
get textureFormat(): string;
set textureFormat(value: string)
}
}
export default starling.filters.FilterHelper;