纹理类

### Hierarchy

- HashObject
  - Texture

## Index

### Constructors

- constructor

### Properties

- _cacheCanvas
- bounds
- img

### Accessors

- hashCode
- height
- width

### Methods

- destroy
- destroyCacheCanvas
- drawToCanvas
- getCacheCanvas
- setFrame
- setImg

## Constructors

### constructor

- new Texture(): Texture

- Overrides HashObject.constructor

  - Defined in core/Texture.ts:17

  #### Returns Texture

## Properties

### _cacheCanvas

_cacheCanvas: any

- Defined in core/Texture.ts:17

### bounds

bounds: Bounds

- Defined in core/Texture.ts:15

### img

img: any

- Defined in core/Texture.ts:14

## Accessors

### hashCode

hashCode:

Inherited from HashObject.hashCode

- Defined in core/HashObject.ts:21

### height

height:

- Defined in core/Texture.ts:52

获取纹理高度

### width

width:

- Defined in core/Texture.ts:45

获取纹理宽度

## Methods

### destroy

- destroy(): void

- - Defined in core/Texture.ts:93

  销毁自身

  #### Returns void

### destroyCacheCanvas

- destroyCacheCanvas(): void

- - Defined in core/Texture.ts:103

  销毁缓存画布

  #### Returns void

### drawToCanvas

- drawToCanvas(context: any, dx?: number, dy?: number, sx?: any, sy?: any, dw?: any, dh?: any): void

- - Defined in core/Texture.ts:85

  绘制到一个画布上

  #### Parameters

  - ##### context: any

  - ##### Default value dx: number = 0

  - ##### Default value dy: number = 0

  - ##### Optional sx: any

  - ##### Optional sy: any

  - ##### Optional dw: any

  - ##### Optional dh: any

  #### Returns void

### getCacheCanvas

- getCacheCanvas(): any

- - Defined in core/Texture.ts:59

  产生一个缓存画布

  #### Returns any

### setFrame

- setFrame(frame: Frame ): void

- - Defined in core/Texture.ts:29

  设置图集中的坐标和尺寸

  #### Parameters

  - ##### frame: Frame

  #### Returns void

### setImg

- setImg(img: any): void

- - Defined in core/Texture.ts:38

  设置图片

  #### Parameters

  - ##### img: any

  #### Returns void

Generated using TypeDoc