Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 2697

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>SWFShape-&#62;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-&#62;setLine</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN54548"
></A
><P
>    (no version information, might be only in CVS)</P
>SWFShape-&#62;setLine&nbsp;--&nbsp;Sets the shape's line style.</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN54551"
></A
><H2
>Description</H2
>void <B
CLASS="methodname"
>swfshape-&#62;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
>&#13;     <B
CLASS="function"
>swfshape-&#62;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
> &#62; 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
>&#13;     <B
CLASS="function"
>swfshape-&#62;setline()</B
> accepts 1, 4 or 5 arguments 
     (not 3 or 2).
    </P
><P
>&#13;     You must declare all line styles before you use them (see example).
    </P
><P
>&#13;     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-&#62;setline()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;?php
  $s = new SWFShape();
  $f1 = $s-&#62;addFill(0xff, 0, 0);
  $f2 = $s-&#62;addFill(0xff, 0x7f, 0);
  $f3 = $s-&#62;addFill(0xff, 0xff, 0);
  $f4 = $s-&#62;addFill(0, 0xff, 0);
  $f5 = $s-&#62;addFill(0, 0, 0xff);

  // bug: have to declare all line styles before you use them
  $s-&#62;setLine(40, 0x7f, 0, 0);
  $s-&#62;setLine(40, 0x7f, 0x3f, 0);
  $s-&#62;setLine(40, 0x7f, 0x7f, 0);
  $s-&#62;setLine(40, 0, 0x7f, 0);
  $s-&#62;setLine(40, 0, 0, 0x7f);

  $f = new SWFFont('Techno.fdb');

  $s-&#62;setRightFill($f1);
  $s-&#62;setLine(40, 0x7f, 0, 0);
  $s-&#62;drawGlyph($f, '!');
  $s-&#62;movePen($f-&#62;getWidth('!'), 0);

  $s-&#62;setRightFill($f2);
  $s-&#62;setLine(40, 0x7f, 0x3f, 0);
  $s-&#62;drawGlyph($f, '#');
  $s-&#62;movePen($f-&#62;getWidth('#'), 0);

  $s-&#62;setRightFill($f3);
  $s-&#62;setLine(40, 0x7f, 0x7f, 0);
  $s-&#62;drawGlyph($f, '%');
  $s-&#62;movePen($f-&#62;getWidth('%'), 0);

  $s-&#62;setRightFill($f4);
  $s-&#62;setLine(40, 0, 0x7f, 0);
  $s-&#62;drawGlyph($f, '*');
  $s-&#62;movePen($f-&#62;getWidth('*'), 0);

  $s-&#62;setRightFill($f5);
  $s-&#62;setLine(40, 0, 0, 0x7f);
  $s-&#62;drawGlyph($f, '@');

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

  header('Content-type: application/x-shockwave-flash');
  $m-&#62;output();
?&#62;</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-&#62;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-&#62;setRightFill</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>