Git Product home page Git Product logo

fl_anim_gif's Introduction

FL_Anim_GIF

Original project: https://github.com/wcout/fltk-gif-animation

Changes

Added functionality to load GIFs from memory buffers.

  • Removed redundant x,y constructor in favor of default arguments and reversed the order of name and position parameters for better overload resolution.
  • Added Fl_Anim_GIF constructor overload to support loading GIFs from memory buffer.
  Fl_Anim_GIF(const char *name_, int x_, int y_, int w_ = 0, int h_ = 0,
              bool start_ = true, bool optimize_mem_ = false, int debug_ = 0);
  Fl_Anim_GIF(const char *name_, const unsigned char *buf_, int len_,
              int x_, int y_, int w_ = 0, int h_ = 0,
              bool start_ = true, bool optimize_mem_ = false, int debug_ = 0);
  • Added _init overloads:
  void _init(bool start_); // tunneling point for both original _init and new overload
  void _init(const char *name_, char *buf_, int len, bool start_, bool optimize_mem_, int debug_); // new overload
  • Added load overload:
bool load(const char *name_, char *buf_, int len_, bool from_file_ = false);
  • Added set_name helper function for load
void set_name(const char *name_);

The changes above are also, obviously, reflected in the implementation file (.cxx)

Installation

Either place the files directly in your source directory or compile to a stand alone static library and link against it (fltk_gif.lib). Remember to include Fl_Anim_GIF.H in both cases.

Usage

unsigned char my_gif[] = {/* some gif bytes here */};
Fl_Anim_GIF animgif(0, 0, 500, 500, NULL, my_gif, sizeof(my_gif));

// See examples folder for more

Remarks

  • This repo only modifies the extern version of the original project.
  • Modifications tested on FLTK 1.3.9

fl_anim_gif's People

Contributors

untyper avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.