ImageAnimator class method (animation design)

Source: Internet
Author: User

Common ImageAnimator methods are shown in the table.

Common Methods for table ImageAnimator classes

Method

Description

Animate

Show multiple frames as an animation

CanAnimate

Returns a Boolean value indicating whether the specified image contains a time-based frame.

Equals

Overloaded. Determine whether the two Object instances are equal (inherited from the Object)

GetHashCode

Used as a hash function of a specific type. GetHashCode is applicable to hash algorithms and data structures (such as hash tables) (inherited from objects)

GetType

Get the Type of the current instance (inherited from Object)

ReferenceEquals

Determine whether the specified Object instance is the same instance (inherited from the Object)

StopAnimate

Terminate an animation.

ToString

Returns the String of the current Object (inherited from the Object)

UpdateFrames

This method can be used to update time frames.

The following describes the common methods of the ImageAnimator class.

Animate Method

Syntax

Public static void Animate (

Image image,

EventHandler onFrameChangedHandler

)

Parameters

Image: The Image object to be animated.

OnFrameChangedHandler: An EventHandler object that specifies the method called when the animation frame changes.

Return Value: This method has no return value.

CanAnimate Method

Syntax

Public static bool CanAnimate (

Image image

)

Parameters

Image: The Image object to be tested.

Return Value: if the specified image contains a time-based frame, true is returned for this method; otherwise, false is returned.

StopAnimate Method

Syntax

Public static void StopAnimate (

Image image,

EventHandler onFrameChangedHandler

)

Parameters

Image: The Image object to stop animation processing.

OnFrameChangedHandler: An EventHandler object that specifies the method called when the animation frame changes.

Return Value: This method has no return value.

UpdateFrames Method

Move the frame forward to all images currently being animated. The new frame is drawn when the next image is rendered.

Syntax

Public static void UpdateFrames ()

Return Value: This method has no return value.

UpdateFrames method (Image)

Move the frame forward in the specified image. The new frame is drawn when the next image is rendered. This method is only applicable to images that contain time-based frames.

Syntax

Public static void UpdateFrames (

Image image

)

Parameters

Image: The Image object for which the frame is to be updated.

Return Value: This method has no return value.

Note: AVI files played with the AutoPlay attribute will be repeated until the value is set to False.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.