Drag[en]gine Script Module DragonScript  1.23
Dragengine.Gui.Video Class Reference

Immutable video resources. More...

Inheritance diagram for Dragengine.Gui.Video:

Constructors

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

Management

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

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.

◆ equals() [2/2]

static 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.

◆ getFrameCount()

int Dragengine.Gui.Video.getFrameCount ( )

Number of frames.

◆ getFrameRate()

float Dragengine.Gui.Video.getFrameRate ( )

Frame rate.

◆ getHeight()

int Dragengine.Gui.Video.getHeight ( )

Height in pixels.

◆ getPlayTime()

float Dragengine.Gui.Video.getPlayTime ( )

Play time in seconds.

◆ getSize()

Point Dragengine.Gui.Video.getSize ( )

Size in pixels.

◆ getWidth()

int Dragengine.Gui.Video.getWidth ( )

Wwidth in pixels.

◆ hashCode()

int Dragengine.Gui.Video.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

◆ loadAsynchron()

static 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.

◆ 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.


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