# RenderTexture - Pixi.JS

#

API Docs for: 1.0.0
Show: Inherited Protected Private Deprecated

# RenderTexture Class

Extends Texture
Defined in: `src/pixi/textures/RenderTexture.js:5`
Module: PIXI

A RenderTexture is a special texture that allows any pixi displayObject to be rendered to it.

## Constructor

### `RenderTexture`

(

- `width`
- `height`

)

Defined in `src/pixi/textures/RenderTexture.js:5`

#### Parameters:

- `width` Number
- `height` Number

- Index
- Methods
- Properties

## Item Index

### Methods

- fromFrame
- render
- setFrame

### Properties

- baseTexture
- frame

## Methods

### `fromFrame`

(

- `frameId`

)

Inherited from Texture: `src/pixi/textures/Texture.js:127`

Helper function that returns a texture based on a frame id If the frame id is not in the texture cache an error will be thrown

#### Parameters:

- `frameId` String

  The frame id of the texture

#### Returns:

Texture

### `render`

(

- `displayObject`
- `clear`

)

Defined in `src/pixi/textures/RenderTexture.js:90`

This function will draw the display object to the texture.

#### Parameters:

- `displayObject` DisplayObject
- `clear` Boolean

  If true the texture will not be cleared before the displayObject is drawn

### `setFrame`

(

- `frame`

)

Inherited from Texture: `src/pixi/textures/Texture.js:83`

Specifies the rectangle region of the baseTexture

#### Parameters:

- `frame` Rectangle

## Properties

### `baseTexture`

BaseTexture

Inherited from Texture: `src/pixi/textures/Texture.js:31`

The base texture of this texture

### `frame`

#Rectangle

Inherited from Texture: `src/pixi/textures/Texture.js:40`

The frame specifies the region of the base texture that this texture uses