<HTML ><HEAD ><TITLE >SWFShape->setLine</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Ming functions for Flash" HREF="ref.ming.html"><LINK REL="PREVIOUS" TITLE="SWFShape->setLeftFill" HREF="function.swfshape.setleftfill.html"><LINK REL="NEXT" TITLE="SWFShape->setRightFill" HREF="function.swfshape.setrightfill.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.swfshape.setleftfill.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.swfshape.setrightfill.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.swfshape.setline" ></A >SWFShape->setLine</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN54548" ></A ><P > (no version information, might be only in CVS)</P >SWFShape->setLine -- Sets the shape's line style.</DIV ><DIV CLASS="refsect1" ><A NAME="AEN54551" ></A ><H2 >Description</H2 >void <B CLASS="methodname" >swfshape->setline</B > ( int width [, int red [, int green [, int blue [, int a]]]])<BR ></BR ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >Warning</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P >This function is <SPAN CLASS="emphasis" ><I CLASS="emphasis" >EXPERIMENTAL</I ></SPAN >. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.</P ></TD ></TR ></TABLE ></DIV ><P > <B CLASS="function" >swfshape->setline()</B > sets the shape's line style. <TT CLASS="parameter" ><I >width</I ></TT > is the line's width. If <TT CLASS="parameter" ><I >width</I ></TT > is 0, the line's style is removed (then, all other arguments are ignored). If <TT CLASS="parameter" ><I >width</I ></TT > > 0, then line's color is set to <TT CLASS="parameter" ><I >red</I ></TT >, <TT CLASS="parameter" ><I >green</I ></TT >, <TT CLASS="parameter" ><I >blue</I ></TT >. Last parameter <TT CLASS="parameter" ><I >a</I ></TT > is optional. </P ><P > <B CLASS="function" >swfshape->setline()</B > accepts 1, 4 or 5 arguments (not 3 or 2). </P ><P > You must declare all line styles before you use them (see example). </P ><P > This simple example will draw a big "!#%*@", in funny colors and gracious style. <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN54587" ></A ><P ><B >Example 1. <B CLASS="function" >swfshape->setline()</B > example</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="php" ><?php $s = new SWFShape(); $f1 = $s->addFill(0xff, 0, 0); $f2 = $s->addFill(0xff, 0x7f, 0); $f3 = $s->addFill(0xff, 0xff, 0); $f4 = $s->addFill(0, 0xff, 0); $f5 = $s->addFill(0, 0, 0xff); // bug: have to declare all line styles before you use them $s->setLine(40, 0x7f, 0, 0); $s->setLine(40, 0x7f, 0x3f, 0); $s->setLine(40, 0x7f, 0x7f, 0); $s->setLine(40, 0, 0x7f, 0); $s->setLine(40, 0, 0, 0x7f); $f = new SWFFont('Techno.fdb'); $s->setRightFill($f1); $s->setLine(40, 0x7f, 0, 0); $s->drawGlyph($f, '!'); $s->movePen($f->getWidth('!'), 0); $s->setRightFill($f2); $s->setLine(40, 0x7f, 0x3f, 0); $s->drawGlyph($f, '#'); $s->movePen($f->getWidth('#'), 0); $s->setRightFill($f3); $s->setLine(40, 0x7f, 0x7f, 0); $s->drawGlyph($f, '%'); $s->movePen($f->getWidth('%'), 0); $s->setRightFill($f4); $s->setLine(40, 0, 0x7f, 0); $s->drawGlyph($f, '*'); $s->movePen($f->getWidth('*'), 0); $s->setRightFill($f5); $s->setLine(40, 0, 0, 0x7f); $s->drawGlyph($f, '@'); $m = new SWFMovie(); $m->setDimension(3000,2000); $m->setRate(12.0); $i = $m->add($s); $i->moveTo(1500-$f->getWidth("!#%*@")/2, 1000+$f->getAscent()/2); header('Content-type: application/x-shockwave-flash'); $m->output(); ?></PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.swfshape.setleftfill.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.swfshape.setrightfill.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >SWFShape->setLeftFill</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.ming.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >SWFShape->setRightFill</TD ></TR ></TABLE ></DIV ></BODY ></HTML >