The TextureOptions class specifies options for loading textures with the `Texture.fromData` and `Texture.fromTextureBase` methods.

### Hierarchy

- TextureOptions

## Index

### Constructors

- constructor

### Properties

- forcePotTexture
- format
- mipMapping
- onReady
- optimizeForRenderToTexture
- premultipliedAlpha
- scale

### Methods

- clone
- copyFrom
- get_forcePotTexture
- get_format
- get_mipMapping
- get_onReady
- get_optimizeForRenderToTexture
- get_premultipliedAlpha
- get_scale
- set_forcePotTexture
- set_format
- set_mipMapping
- set_onReady
- set_optimizeForRenderToTexture
- set_premultipliedAlpha
- set_scale

## Constructors

### constructor

- new TextureOptions(scale?: number, mipMapping?: boolean, format?: string, premultipliedAlpha?: boolean, forcePotTexture?: boolean): TextureOptions

- - Defined in lib/starling/textures/TextureOptions.d.ts:8

  Creates a new instance with the given options.

  #### Parameters

  - ##### Optional scale: number

  - ##### Optional mipMapping: boolean

  - ##### Optional format: string

  - ##### Optional premultipliedAlpha: boolean

  - ##### Optional forcePotTexture: boolean

  #### Returns TextureOptions

## Properties

### forcePotTexture

forcePotTexture: boolean

- Defined in lib/starling/textures/TextureOptions.d.ts:47

Indicates if the underlying Stage3D texture should be created as the power-of-two based `Texture` class instead of the more memory efficient `RectangleTexture`. That might be useful when you need to render the texture with wrap mode `repeat`. @default false

### format

format: string

- Defined in lib/starling/textures/TextureOptions.d.ts:29

The `Context3DTextureFormat` of the underlying texture data. Only used for textures that are created from Bitmaps; the format of ATF files is set when they are created. @default BGRA

### mipMapping

mipMapping: boolean

- Defined in lib/starling/textures/TextureOptions.d.ts:34

Indicates if the texture contains mip maps. @default false

### onReady

onReady: function

- Defined in lib/starling/textures/TextureOptions.d.ts:59

If this value is set, the texture will be loaded asynchronously (if possible). The texture can only be used when the callback has been executed.

This is the expected definition: `function(texture:Texture):void;`

@default null

#### Type declaration

- - (Texture: any): void

  - #### Parameters

    - ##### Texture: any

    #### Returns void

### optimizeForRenderToTexture

optimizeForRenderToTexture: boolean

- Defined in lib/starling/textures/TextureOptions.d.ts:39

Indicates if the texture will be used as render target.

### premultipliedAlpha

premultipliedAlpha: boolean

- Defined in lib/starling/textures/TextureOptions.d.ts:67

Indicates if the alpha values are premultiplied into the RGB values. This is typically true for textures created from BitmapData and false for textures created from ATF data. This property will only be read by the `Texture.fromTextureBase` factory method. @default true

### scale

scale: number

- Defined in lib/starling/textures/TextureOptions.d.ts:22

The scale factor, which influences width and height properties. If you pass '-1', the current global content scale factor will be used. @default 1.0

## Methods

### clone

- clone(): TextureOptions

- - Defined in lib/starling/textures/TextureOptions.d.ts:15

  Creates a clone of the TextureOptions object with the exact same properties.

  #### Returns TextureOptions

### copyFrom

- copyFrom(other: TextureOptions): void

- - Defined in lib/starling/textures/TextureOptions.d.ts:18

  Copies all properties from another TextureOptions instance.

  #### Parameters

  - ##### other: TextureOptions

  #### Returns void

### Protected get_forcePotTexture

- get_forcePotTexture(): boolean

- - Defined in lib/starling/textures/TextureOptions.d.ts:48

  #### Returns boolean

### Protected get_format

- get_format(): string

- - Defined in lib/starling/textures/TextureOptions.d.ts:30

  #### Returns string

### Protected get_mipMapping

- get_mipMapping(): boolean

- - Defined in lib/starling/textures/TextureOptions.d.ts:35

  #### Returns boolean

### Protected get_onReady

- get_onReady(): function

- - Defined in lib/starling/textures/TextureOptions.d.ts:60

  #### Returns function

  - - (Texture: any): void

    - #### Parameters

      - ##### Texture: any

      #### Returns void

### Protected get_optimizeForRenderToTexture

- get_optimizeForRenderToTexture(): boolean

- - Defined in lib/starling/textures/TextureOptions.d.ts:40

  #### Returns boolean

### Protected get_premultipliedAlpha

- get_premultipliedAlpha(): boolean

- - Defined in lib/starling/textures/TextureOptions.d.ts:68

  #### Returns boolean

### Protected get_scale

- get_scale(): number

- - Defined in lib/starling/textures/TextureOptions.d.ts:23

  #### Returns number

### Protected set_forcePotTexture

- set_forcePotTexture(value: boolean): boolean

- - Defined in lib/starling/textures/TextureOptions.d.ts:49

  #### Parameters

  - ##### value: boolean

  #### Returns boolean

### Protected set_format

- set_format(value: string): string

- - Defined in lib/starling/textures/TextureOptions.d.ts:31

  #### Parameters

  - ##### value: string

  #### Returns string

### Protected set_mipMapping

- set_mipMapping(value: boolean): boolean

- - Defined in lib/starling/textures/TextureOptions.d.ts:36

  #### Parameters

  - ##### value: boolean

  #### Returns boolean

### Protected set_onReady

- set_onReady(value: function): function

- - Defined in lib/starling/textures/TextureOptions.d.ts:61

  #### Parameters

  - ##### value: function

    - - (Texture: any): void

      - #### Parameters

        - ##### Texture: any

        #### Returns void

  #### Returns function

  - - (Texture: any): void

    - #### Parameters

      - ##### Texture: any

      #### Returns void

### Protected set_optimizeForRenderToTexture

- set_optimizeForRenderToTexture(value: boolean): boolean

- - Defined in lib/starling/textures/TextureOptions.d.ts:41

  #### Parameters

  - ##### value: boolean

  #### Returns boolean

### Protected set_premultipliedAlpha

- set_premultipliedAlpha(value: boolean): boolean

- - Defined in lib/starling/textures/TextureOptions.d.ts:69

  #### Parameters

  - ##### value: boolean

  #### Returns boolean

### Protected set_scale

- set_scale(value: number): number

- - Defined in lib/starling/textures/TextureOptions.d.ts:24

  #### Parameters

  - ##### value: number

  #### Returns number

Generated using TypeDoc