shape.cgi

来自「Ming is a library for generating Macrome」· CGI 代码 · 共 34 行

CGI
34
字号
#!/usr/bin/perluse strict;#use lib("/home/peter/ming3/lib/perl5/site_perl");$|=1;use SWF qw(Movie Shape);SWF::setScale(1.0);my $s = new SWF::Shape();$s->setLine(40, 0x7f, 0, 0);$s->setRightFill($s->addFill(0xff, 0, 0));$s->movePenTo(200, 200);$s->drawLineTo(6200, 200);$s->drawLineTo(6200, 4600);$s->drawCurveTo(200, 4600, 200, 200);my $m = new SWF::Movie();$m->setDimension(6400, 4800);$m->setRate(12.0);$m->add($s);$m->nextFrame();# decide if its called from commandline or as cgiscriptif (exists $ENV{"REQUEST_URI"}){	print "Content-type: application/x-shockwave-flash\n\n";	$m->output();}else {	$m->save("$0.swf");	print "Generated file written to $0.swf\n";}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?