
#include "ming.h"

int main()
{
  SWFShape s;
  SWFFill f;
  SWFMovie m;

  Ming_init();
  Ming_setScale(1.0);

  s = newSWFShape();
  f = SWFShape_addBitmapFill(s, newSWFJpegBitmap(fopen("../common/backyard.jpg", "rb")),
  							 SWFFILL_TILED_BITMAP);
  SWFShape_setRightFill(s, f);

  SWFShape_drawLine(s, 640, 0);
  SWFShape_drawLine(s, 0, 480);
  SWFShape_drawLine(s, -640, 0);
  SWFShape_drawLine(s, 0, -480);

  m = newSWFMovie();
  SWFMovie_setDimension(m, 640, 480);
  SWFMovie_add(m, s);

  SWFMovie_save(m, "test.swf");

  exit(0);
}

