
#include <mingpp.h>

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

  SWFMorph *p = new SWFMorph();
  SWFShape *s;

  s = p->getShape1();
  s->setLine(0,0,0,0);
  s->setLeftFill(s->addSolidFill(0xff, 0, 0));
  s->movePenTo(-1000,-1000);
  s->drawLine(2000,0);
  s->drawLine(0,2000);
  s->drawLine(-2000,0);
  s->drawLine(0,-2000);

  s = p->getShape2();
  s->setLine(60,0,0,0);
  s->setLeftFill(s->addSolidFill(0, 0, 0xff));
  s->movePenTo(0,-1000);
  s->drawLine(1000,1000);
  s->drawLine(-1000,1000);
  s->drawLine(-1000,-1000);
  s->drawLine(1000,-1000);

  SWFMovie *m = new SWFMovie();
  m->setDimension(3000,2000);
  m->setBackground(0xff, 0xff, 0xff);

  SWFDisplayItem *i = m->add(p);
  i->moveTo(1500,1000);

  for(int r=0; r<=10; ++r)
  {
    i->setRatio(r/10.0);
    m->nextFrame();
  }

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

  exit(0);
}
