AnimatedImage

An animated image component.

Constructors

this
this(string[] paths)

Creates a new animated image component.

Members

Functions

clean
void clean()

See: Component.clean()

fadeIn
void fadeIn(ubyte speed)

Fades in the animation.

fadeOut
void fadeOut(ubyte speed)

Fades out the animation.

fitToSize
void fitToSize(double maxWidth, double maxHeight, bool enlarge)

Scales and fits the image into a specific size.

refresh
void refresh(size_t width, size_t height)

See: Component.refresh()

render
void render(ExternalWindow window)

See: Component.render()

updatePosition
void updatePosition()

See: Component.updatePosition()

updateSize
void updateSize()

See: Component.updateSize()

Properties

alpha
ubyte alpha [@property getter]

Gets the alpha channel of the animation.

alpha
ubyte alpha [@property setter]

Sets the alpha channel of the animation.

animationSpeed
ptrdiff_t animationSpeed [@property getter]

Gets the animation speed.

animationSpeed
ptrdiff_t animationSpeed [@property setter]

Sets the animation speed.

fullScreen
bool fullScreen [@property getter]

Gets a boolean determining whether the animation is full-screen or not.

fullScreen
bool fullScreen [@property setter]

Sets a boolean determining whether the animation is full-screen or not. If not initialized with width/height from a layer then refresh() must manually be set.

Variables

fadedIn
void delegate() fadedIn;

A handler for when the animation has faded in.

fadedOut
void delegate() fadedOut;

A handler for when the animation has faded out.

fadingIn
void delegate(ubyte) fadingIn;

A handler for when the animation is fading in.

fadingOut
void delegate(ubyte) fadingOut;

A handler for when the animation is fading out.

Inherited Members

From Component

position
FloatVector position [@property getter]

Gets the position.

position
FloatVector position [@property setter]

Sets the position.

x
ptrdiff_t x [@property getter]

Gets the x coordinate.

y
ptrdiff_t y [@property getter]

Gets the y coordinate.

size
FloatVector size [@property getter]

Gets the size.

size
FloatVector size [@property setter]

Sets the size.

width
ptrdiff_t width [@property getter]

Gets the width.

height
ptrdiff_t height [@property getter]

Gets the height.

intersect
bool intersect(FloatVector p)

Checks whether the component intersects with a specific point.

updateInternalPosition
void updateInternalPosition(FloatVector position)

Updates the internal position. Use this to avoid event handling.

globalMousePress
void delegate(MouseButton button, ref bool stopEvent) globalMousePress;

Handler for global mouse press events.

globalMouseRelease
void delegate(MouseButton button, ref bool stopEvent) globalMouseRelease;

Handler for global mouse release events.

globalMouseMove
void delegate(FloatVector position, ref bool stopEvent) globalMouseMove;

Handler for global mouse movement events.

globalKeyPress
void delegate(KeyboardKey key, ref bool stopEvent) globalKeyPress;

Handler for global key press events.

globalKeyRelease
void delegate(KeyboardKey key, ref bool stopEvent) globalKeyRelease;

Handler for global key release events.

mousePress
void delegate(MouseButton button, ref bool stopEvent) mousePress;

Handler for mouse press events.

mouseRelease
void delegate(MouseButton button, ref bool stopEvent) mouseRelease;

Handler for mouse release events.

mouseMove
void delegate(FloatVector position, ref bool stopEvent) mouseMove;

Handler for mouse movement events.

keyPress
void delegate(KeyboardKey key, ref bool stopEvent) keyPress;

Handler for key press events.

keyRelease
void delegate(KeyboardKey key, ref bool stopEvent) keyRelease;

Handler for key release events.

render
void render(ExternalWindow window)

Will render the component. Called during every frame render.

refresh
void refresh(size_t width, size_t height)

Refreshes the component with a given width ahd height. This is usually the layer size which is usually the window size.

updateSize
void updateSize()

Called when the size of the component updates.

updatePosition
void updatePosition()

Called when the position of the component updates.

clean
void clean()

Cleans the component for its native objects.

Meta