import { RenderTexture } from './RenderTexture'; import type { MSAA_QUALITY, SCALE_MODES } from '@pixi/constants'; import type { ExtensionMetadata } from '@pixi/extensions'; import type { Rectangle } from '@pixi/math'; import type { IRenderableObject, IRenderer } from '../IRenderer'; import type { ISystem } from '../system/ISystem'; export interface IGenerateTextureOptions { /** The scale mode of the texture. Optional, defaults to `PIXI.BaseTexture.defaultOptions.scaleMode`. */ scaleMode?: SCALE_MODES; /** The resolution / device pixel ratio of the texture being generated. Optional defaults to Renderer resolution. */ resolution?: number; /** * The region of the displayObject, that shall be rendered, * if no region is specified, defaults to the local bounds of the displayObject. */ region?: Rectangle; /** The number of samples of the frame buffer. */ multisample?: MSAA_QUALITY; } /** * System that manages the generation of textures from the renderer. * @memberof PIXI */ export declare class GenerateTextureSystem implements ISystem { /** @ignore */ static extension: ExtensionMetadata; renderer: IRenderer; private readonly _tempMatrix; constructor(renderer: IRenderer); /** * A Useful function that returns a texture of the display object that can then be used to create sprites * This can be quite useful if your displayObject is complicated and needs to be reused multiple times. * @param displayObject - The displayObject the object will be generated from. * @param {IGenerateTextureOptions} options - Generate texture options. * @returns a shiny new texture of the display object passed in */ generateTexture(displayObject: IRenderableObject, options?: IGenerateTextureOptions): RenderTexture; destroy(): void; }