Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Gui.Video Class Reference

Immutable video resources. More...

Inheritance diagram for Dragengine.Gui.Video:

Constructors

Video new (String filename)
 Load video from file.
static void loadAsynchron (String filename, ResourceListener listener)
 Load video from file asynchronously.

Management

String getFilename ()
 Normalized filename the video has been loaded from.
int getWidth ()
 Wwidth in pixels.
int getHeight ()
 Height in pixels.
Point getSize ()
 Size in pixels.
int getFrameCount ()
 Number of frames.
float getFrameRate ()
 Frame rate.
float getPlayTime ()
 Play time in seconds.
bool equals (Object other)
 Video is equal to another object.
int hashCode ()
 Hash code for use as dictionary keys.
static bool equals (Video video1, Video video2)
 Videos are equal.

Detailed Description

Immutable video resources.

Video resources provide static precanned video data to be used with Animators to produce dynamic videos.

This is a native class. It can not be subclassed.

Member Function Documentation

◆ equals() [1/2]

bool Dragengine.Gui.Video.equals ( Object other)

Video is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type Video and both point to the same engine video resource.

References getPlayTime().

Referenced by hashCode().

◆ equals() [2/2]

bool Dragengine.Gui.Video.equals ( Video video1,
Video video2 )
static

Videos are equal.

In contrary to equals(Object) this is safe to be called with null values.

◆ getFilename()

String Dragengine.Gui.Video.getFilename ( )

Normalized filename the video has been loaded from.

References getFilename().

Referenced by getFilename().

◆ getFrameCount()

int Dragengine.Gui.Video.getFrameCount ( )

Number of frames.

References getHeight().

Referenced by getPlayTime().

◆ getFrameRate()

float Dragengine.Gui.Video.getFrameRate ( )

Frame rate.

References getSize().

Referenced by getPlayTime().

◆ getHeight()

int Dragengine.Gui.Video.getHeight ( )

Height in pixels.

References getWidth().

Referenced by getFrameCount().

◆ getPlayTime()

float Dragengine.Gui.Video.getPlayTime ( )

Play time in seconds.

References getFrameCount(), and getFrameRate().

Referenced by equals().

◆ getSize()

Point Dragengine.Gui.Video.getSize ( )

Size in pixels.

Referenced by getFrameRate().

◆ getWidth()

int Dragengine.Gui.Video.getWidth ( )

Wwidth in pixels.

Referenced by getHeight().

◆ hashCode()

int Dragengine.Gui.Video.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

References equals(), and hashCode().

Referenced by hashCode().

◆ loadAsynchron()

void Dragengine.Gui.Video.loadAsynchron ( String filename,
ResourceListener listener )
static

Load video from file asynchronously.

Registers a request in the game engine to load an video. Once finished or if the file is already loaded the listener is used to deliver the loaded video or null if the loading failed.

References loadAsynchron().

Referenced by loadAsynchron().

◆ new()

Video Dragengine.Gui.Video.new ( String filename)

Load video from file.

If the video file has been already loaded it is assigned to this object. If the video is not loaded yet the engine loads the video. This call blocks until the video is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded video resource. Once no object instance uses an video file anymore it is released from memory.

References new().

Referenced by new().


The documentation for this class was generated from the following file: