17#ifndef Fl_Anim_Gif_Image_H
18#define Fl_Anim_Gif_Image_H
24#include <FL/Fl_GIF_Image.H>
83 const size_t length,
Fl_Widget *canvas = 0,
84 unsigned short flags = 0);
89 bool load(const
char *name, const
unsigned char *imgdata=NULL,
size_t imglength=0);
93 void frame_uncache(
bool uncache);
94 bool frame_uncache() const;
95 double delay(
int frame_) const;
96 void delay(
int frame,
double delay);
97 void canvas(
Fl_Widget *canvas,
unsigned short flags = 0);
100 int canvas_h() const;
101 bool is_animated() const;
102 const
char *name() const;
103 void speed(
double speed);
104 double speed() const;
108 void frame(
int frame);
124 int frame_x(
int frame)
const;
125 int frame_y(
int frame)
const;
126 int frame_w(
int frame)
const;
127 int frame_h(
int frame)
const;
134 void draw(
int x,
int y,
int w,
int h,
int cx = 0,
int cy = 0)
FL_OVERRIDE;
141 static
int frame_count(const
char *name, const
unsigned char *imgdata = NULL,
size_t imglength = 0);
165 void set_frame(
int frame);
167 static
void cb_animate(
void *
d);
176 unsigned short flags_;
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition Enumerations.H:1120
The Fl_Anim_GIF_Image class supports loading, caching, and drawing of animated Compuserve GIFSM image...
Definition Fl_Anim_GIF_Image.H:27
Fl_Anim_GIF_Image(const char *filename, Fl_Widget *canvas=0, unsigned short flags=0)
Load an animated GIF image from a file.
Definition Fl_Anim_GIF_Image.cxx:522
Flags
When opening an Fl_Anim_GIF_Image there are some options that can be passed in a flags value.
Definition Fl_Anim_GIF_Image.H:37
@ OPTIMIZE_MEMORY
Often frames change just a small area of the animation canvas.
Definition Fl_Anim_GIF_Image.H:67
@ DONT_SET_AS_IMAGE
This flag indicates to the loader that it should not set the animation as image() member of the canva...
Definition Fl_Anim_GIF_Image.H:58
@ DEBUG_FLAG
This flag can be used to print even more informations about the decoding process to the console.
Definition Fl_Anim_GIF_Image.H:77
@ DONT_START
This flag indicates to the loader that it should not start the animation immediately after successful...
Definition Fl_Anim_GIF_Image.H:44
@ LOG_FLAG
This flag can be used to print informations about the decoding process to the console.
Definition Fl_Anim_GIF_Image.H:72
@ DONT_RESIZE_CANVAS
This flag indicates to the loader that it should not resize the canvas widget of the animation to the...
Definition Fl_Anim_GIF_Image.H:51
bool valid() const
Check if animation is valid.
Definition Fl_Anim_GIF_Image.cxx:1287
static double min_delay
The min_delay value can be used to set a minimum value for the frame delay for playback.
Definition Fl_Anim_GIF_Image.H:159
static bool loop
The loop flag can be used to (dis-)allow loop count.
Definition Fl_Anim_GIF_Image.H:151
void frame(int frame)
Set the current frame.
Definition Fl_Anim_GIF_Image.cxx:857
bool playing() const
Return if the animation is currently running or stopped.
Definition Fl_Anim_GIF_Image.H:119
Fl_GIF_Image(const char *filename)
This constructor loads a GIF image from the given file.
Definition Fl_GIF_Image.cxx:133
Base class for image caching, scaling and drawing.
Definition Fl_Image.H:60
void d(int D)
Sets the current image depth.
Definition Fl_Image.H:97
void desaturate() FL_OVERRIDE
The desaturate() method converts an image to grayscale.
Definition Fl_Pixmap.cxx:322
Fl_Image * copy(int W, int H) const FL_OVERRIDE
Creates a resized copy of the image.
Definition Fl_Pixmap.cxx:128
void color_average(Fl_Color c, float i) FL_OVERRIDE
The color_average() method averages the colors in the image with the provided FLTK color value.
Definition Fl_Pixmap.cxx:228
static int has_timeout(Fl_Timeout_Handler cb, void *data=0)
Returns true if the timeout exists and has not been called yet.
Definition Fl.cxx:344
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
Definition Fl_GIF_Image.H:61