root/test/Text/test03-cxx.C

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

#include <cstdlib>
#include <cstdio>
#include <mingpp.h>

int main()
{
        FILE *fontfile;
        
        try {
                SWFMovie *m = new SWFMovie();
                SWFText *text = new SWFText(2);
        
                SWFFont *font = new SWFFont(MEDIADIR "/font01.fdb");
        
                text->setFont( font);
                text->setColor( 0, 0, 0, 0xff);
                text->setHeight( 20);
                text->moveTo(10, 20);
                text->addString( "abc", NULL);
                m->add(text);
                m->nextFrame();
                m->save("test03.swf");
        }
        catch(SWFException &e)
        {
                std::cerr << "SWFException: " << e.what() << std::endl << std::endl;
                return EXIT_FAILURE;
        }
        return 0;
}
        

/* [<][>][^][v][top][bottom][index][help] */