#!/usr/bin/perl -w
use strict;

use SWF qw(:ALL);

SWF::setScale(1.0);

my $s = new SWF::Shape();
my $f = new SWF::Font('../common/test.fdb');

$s->setRightFill($s->addFill(0xff, 0, 0));
$s->setLine(40, 0x7f, 0, 0);
$s->drawGlyph($f, unpack('C','!'));
$s->movePen($f->getWidth('!'), 0);

$s->setRightFill($s->addFill(0xff, 0x7f, 0));
$s->setLine(40, 0x7f, 0x3f, 0);
$s->drawGlyph($f, unpack('C','#'));
$s->movePen($f->getWidth('#'), 0);

$s->setRightFill($s->addFill(0xff, 0xff, 0));
$s->setLine(40, 0x7f, 0x7f, 0);
$s->drawGlyph($f, unpack('C','%'));
$s->movePen($f->getWidth('%'), 0);

$s->setRightFill($s->addFill(0, 0xff, 0));
$s->setLine(40, 0, 0x7f, 0);
$s->drawGlyph($f, unpack('C','*'));
$s->movePen($f->getWidth('*'), 0);

$s->setRightFill($s->addFill(0, 0, 0xff));
$s->setLine(40, 0, 0, 0x7f);
$s->drawGlyph($f, unpack('C','@'));

my $m = new SWF::Movie();
$m->setDimension(3000,2000);
$m->setRate(12.0);
my $i = $m->add($s);
$i->moveTo(1500-$f->getWidth("!#%*@")/2, 1000+$f->getAscent()/2);

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