
#include <mingpp.h>

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

  SWFShape *s = new SWFShape();
  SWFFill *f = s->addBitmapFill(new SWFBitmap("../common/alpha.dbl"));
  f->moveTo(-16, -16);
  s->setRightFill(f);

  s->movePenTo(-16, -16);
  s->drawLine(32, 0);
  s->drawLine(0, 32);
  s->drawLine(-32, 0);
  s->drawLine(0, -32);

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

  i = p->add(s);
  p->nextFrame();

  for(int n=0; n<90; ++n)
  {
    i->rotate(4);
    p->nextFrame();
  }

  SWFMovie *m = new SWFMovie();
  m->setDimension(64, 48);

  i = m->add(p);
  i->moveTo(24, 24);

  i = m->add(p);
  i->moveTo(40, 24);

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

  exit(0);
}
