## GIFanim(filename)

Constructor

#### # new GIFanim(filename)

load a GIF animation.

Note: GIFanim module must be loaded by calling LoadLibrary("gifanim") before using!

##### Parameters:

Name | Type | Description
--- | --- | ---
`filename` | `string` | file name of the GIF to load

See:
  - LoadLibrary()

# Members

Type: `number`

#### # duration

duration of animation in milliseconds

Type: `string`

#### # filename

name of gif

Type: `number`

#### # frameCount

total frames in file

Type: `number`

#### # height

height of GIF

Type: `number`

#### # maxDelay

maximum frame delay

Type: `number`

#### # minDelay

minimum frame delay

Type: `number`

#### # width

width of GIF

# Methods

#### # Close()

Close GIFanim after use

#### # GetComment() → {string}

get gif anim comment

Returns:

the gif anim comment

Type: `string`

#### # PlayFrame(x, y) → {number}

play the next frame of the animation. Frames are rendered consecutive with each call. It is not possible to directly render a specific frame except by using SkipFrame().

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | `number` | x position to render the left, upper edge of the animation
`y` | `number` | y position to render the left, upper edge of the animation

Returns:

-1 if this was the last frame, else the delay for the next frame.

Type: `number`

#### # SkipFrame() → {number}

skip the rendering of a frame.

Returns:

-1 if this was the last frame, else the delay for the next frame.

Type: `number`