bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

plotutils 2.4.1: cannot get animated gif using libplotter


From: Cyril Deremble
Subject: plotutils 2.4.1: cannot get animated gif using libplotter
Date: Thu, 10 Nov 2005 14:38:56 +0100
User-agent: KMail/1.8.2

Hello,

I am using the plotutils package version 2.4.1 on debian sarge i686 machine.

I'm trying to get a simple animated gif image but I only get the last frame.

The source code I use is:

#include <iostream>
#include <plotter.h>

using namespace std;

char bitmap_size [] = "150x100";
char bg_color [] = "orange";
char gif_iterations [] = "100";
char gif_delay [] = "5";


int main()
{
        /* set Plotter parameters */
        PlotterParams plotter_params;
        plotter_params.setplparam ("BITMAPSIZE", bitmap_size);
        plotter_params.setplparam ("BG_COLOR", bg_color);
        plotter_params.setplparam ("TRANSPARENT_COLOR", bg_color);
        plotter_params.setplparam ( "GIF_ITERATIONS", gif_iterations);
        plotter_params.setplparam ("GIF_DELAY", gif_delay);
        
        GIFPlotter plotter (cin, cout, cerr, plotter_params);
        
        plotter.openpl();                                               /* 
begin page of graphics */
        
        plotter.space (0, 0, 149, 99);                  /* set user coor system 
*/
        plotter.pencolorname ("red");                           /* use red pen 
*/
        plotter.linewidth (5);                                  /* set line 
thickness */
        plotter.filltype (1);                                   /* objects will 
be filled */
        plotter.fillcolorname ("black");                        /* set the fill 
color */
        
        
        for (int i = 0; i < 180 ;  i += 15)
        {
                plotter.erase ();                                       /* 
begin new GIF image */
                plotter.ellipse (75, 50, 40, 20, i);    /* draw an ellipse */
        }
        
        plotter.closepl ();                                     /* end page of 
graphics */
        
  return 0;
}

What did I wrong?

Thank you

Cyril Deremble





reply via email to

[Prev in Thread] Current Thread [Next in Thread]