#!/usr/bin/perl -w

use SWF("Shape");

$s= new SWF::Shape;

$s->setLine(1,0,0,0);
$s->drawLine(30,60);
$s->drawLine(20,0);
$s->drawLine(30,-20);

$x1=$s->getPenX;
$y1=$s->getPenY;
($x2,$y2)=$s->getPen;

print(STDERR "shape construction: Pen should be at (80, 40).\n");
print(STDERR "shape construction: getPenX() and getPenY() tell the pen is at ($x1, $y1)\n");
print(STDERR "shape construction: getPen() tells the pen is at ($x2, $y2).\n");

$m = new SWF::Movie;
$m->setDimension(200,100);

$s_1=$m->add($s);
$s_1->move(50,20);


($xpos2,$ypos2)=$s_1->getPosition;

print(STDERR "shape instance: Position should be at (50, 20).\n");
print(STDERR "shape instance: getPosition() tells the pen is at ($xpos2, $ypos2).\n");

$m->nextFrame;

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

