
#include <mingpp.h>

int main()
{
  Ming_init();
  Ming_setScale(1.0);

  SWFShape *s = new SWFShape();
  s->setRightFill(s->addSolidFill(0xff, 0, 0));
  s->movePenTo(-500,-500);
  s->drawLineTo(500,-500);
  s->drawLineTo(500,500);
  s->drawLineTo(-500,500);
  s->drawLineTo(-500,-500);

  SWFSprite *p = new SWFSprite();
  SWFDisplayItem *i;

  i = p->add(s);

  for(int j=0; j<17; ++j)
  {
    p->nextFrame();
    i->rotate(5);
  }
  p->nextFrame();

  SWFMovie *m = new SWFMovie();

  i = m->add(p);
  i->moveTo(1500,1000);
  i->setName("blah");

  m->setBackground(0xff, 0xff, 0xff);
  m->setDimension(3000,2000);

  m->save("test.swf");

  exit(0);
}
