Class: Wx::Animation
Overview
This class is untracked and should not be derived from nor instances extended!
The Animation class handles the interface between the animation control and the details of the animation image or data.
Predefined objects/pointers: NULL_ANIMATION
Class Method Summary collapse
-
.add_handler(handler) ⇒ void
Add a new decoder to the list of animation decoders.
-
.clean_up_handlers ⇒ void
Clear out the animation decoder list.
-
.find_handler(animType) ⇒ Wx::AnimationDecoder
Search for an animation decoder by type.
-
.get_handlers ⇒ Array<Wx::AnimationDecoder>
Returns the list of animation decoders used by the generic animation and GenericAnimationCtrl.
-
.init_standard_handlers ⇒ void
Load the stock animation decoders (currently GIF, ANI and WebP) into the list of decoders.
-
.insert_handler(handler) ⇒ void
Insert a new decoder to the front of the list of animation decoders.
Instance Method Summary collapse
-
#get_delay(frame) ⇒ Integer
(also: #delay)
Returns the delay for the i-th frame in milliseconds.
-
#get_frame(frame) ⇒ Wx::Image
(also: #frame)
Returns the i-th frame as a Image.
-
#get_frame_count ⇒ Integer
(also: #frame_count)
Returns the number of frames for this animation.
-
#get_size ⇒ Wx::Size
(also: #size)
Returns the size of the animation.
-
#initialize(*args) ⇒ Animation
constructor
A new instance of Animation.
-
#is_ok ⇒ Boolean
(also: #ok?)
Returns true if animation data is present.
-
#load(stream, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Boolean
Loads an animation from the given stream.
-
#load_file(name, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Boolean
Loads an animation from a file.
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize ⇒ Wx::Animation #initialize(name, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Wx::Animation #initialize(other) ⇒ Wx::Animation
Returns a new instance of Animation.
103 |
# File 'lib/wx/doc/gen/animation.rb', line 103 def initialize(*args) end |
Class Method Details
.add_handler(handler) ⇒ void
This method returns an undefined value.
Add a new decoder to the list of animation decoders.
161 |
# File 'lib/wx/doc/gen/animation.rb', line 161 def self.add_handler(handler) end |
.clean_up_handlers ⇒ void
This method returns an undefined value.
Clear out the animation decoder list.
This is called automatically at program shutdown.
183 |
# File 'lib/wx/doc/gen/animation.rb', line 183 def self.clean_up_handlers; end |
.find_handler(animType) ⇒ Wx::AnimationDecoder
Search for an animation decoder by type.
171 |
# File 'lib/wx/doc/gen/animation.rb', line 171 def self.find_handler(animType) end |
.get_handlers ⇒ Array<Wx::AnimationDecoder>
Returns the list of animation decoders used by the generic animation and GenericAnimationCtrl.
156 |
# File 'lib/wx/doc/gen/animation.rb', line 156 def self.get_handlers; end |
.init_standard_handlers ⇒ void
This method returns an undefined value.
Load the stock animation decoders (currently GIF, ANI and WebP) into the list of decoders.
This is called automatically at program startup.
177 |
# File 'lib/wx/doc/gen/animation.rb', line 177 def self.init_standard_handlers; end |
.insert_handler(handler) ⇒ void
This method returns an undefined value.
Insert a new decoder to the front of the list of animation decoders.
166 |
# File 'lib/wx/doc/gen/animation.rb', line 166 def self.insert_handler(handler) end |
Instance Method Details
#get_delay(frame) ⇒ Integer Also known as: delay
Returns the delay for the i-th frame in milliseconds.
If -1 is returned the frame is to be displayed forever.
115 |
# File 'lib/wx/doc/gen/animation.rb', line 115 def get_delay(frame) end |
#get_frame(frame) ⇒ Wx::Image Also known as: frame
Returns the i-th frame as a Image.
This method is not implemented in the native WXGTK implementation of this class and always returns an invalid image there.
130 |
# File 'lib/wx/doc/gen/animation.rb', line 130 def get_frame(frame) end |
#get_frame_count ⇒ Integer Also known as: frame_count
Returns the number of frames for this animation.
This method is not implemented in the native WXGTK implementation of this class and always returns 0 there.
122 |
# File 'lib/wx/doc/gen/animation.rb', line 122 def get_frame_count; end |
#get_size ⇒ Wx::Size Also known as: size
Returns the size of the animation.
135 |
# File 'lib/wx/doc/gen/animation.rb', line 135 def get_size; end |
#is_ok ⇒ Boolean Also known as: ok?
Returns true if animation data is present.
107 |
# File 'lib/wx/doc/gen/animation.rb', line 107 def is_ok; end |
#load(stream, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Boolean
Loads an animation from the given stream.
true if the operation succeeded, false otherwise.
152 |
# File 'lib/wx/doc/gen/animation.rb', line 152 def load(stream, type=Wx::AnimationType::ANIMATION_TYPE_ANY) end |
#load_file(name, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Boolean
Loads an animation from a file.
true if the operation succeeded, false otherwise.
144 |
# File 'lib/wx/doc/gen/animation.rb', line 144 def load_file(name, type=Wx::AnimationType::ANIMATION_TYPE_ANY) end |