Sophie

Sophie

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

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

<HTML
><HEAD
><TITLE
>SWFShape-&#62;addFill</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="SWFMovie"
HREF="function.swfmovie.html"><LINK
REL="NEXT"
TITLE="SWFShape->drawCurve"
HREF="function.swfshape.drawcurve.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.swfmovie.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.drawcurve.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.swfshape.addfill"
></A
>SWFShape-&#62;addFill</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN54249"
></A
><P
>    (no version information, might be only in CVS)</P
>SWFShape-&#62;addFill&nbsp;--&nbsp;Adds a solid fill to the shape.</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN54252"
></A
><H2
>Description</H2
>void <B
CLASS="methodname"
>swfshape-&#62;addfill</B
> ( 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
>void <B
CLASS="methodname"
>swfshape-&#62;addfill</B
> ( SWFbitmap bitmap [, int flags])<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
>void <B
CLASS="methodname"
>swfshape-&#62;addfill</B
> ( SWFGradient gradient [, int flags])<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;addfill()</B
> adds a solid fill to the shape's list 
     of fill styles. <B
CLASS="function"
>swfshape-&#62;addfill()</B
> accepts three different
     types of arguments.
    </P
><P
>&#13;     <TT
CLASS="parameter"
><I
>red</I
></TT
>, <TT
CLASS="parameter"
><I
>green</I
></TT
>, <TT
CLASS="parameter"
><I
>blue</I
></TT
>
     is a color (RGB mode). Last parameter <TT
CLASS="parameter"
><I
>a</I
></TT
> is optional.
    </P
><P
>&#13;     The <TT
CLASS="parameter"
><I
>bitmap</I
></TT
> argument is an <A
HREF="function.swfbitmap.html"
><B
CLASS="function"
>swfbitmap()</B
></A
> object.
     The <TT
CLASS="parameter"
><I
>flags</I
></TT
> argument can be one
     of the following values : SWFFILL_CLIPPED_BITMAP or SWFFILL_TILED_BITMAP. 
     Default is SWFFILL_TILED_BITMAP. I think. 
    </P
><P
>&#13;     The <TT
CLASS="parameter"
><I
>gradient</I
></TT
> argument is an <A
HREF="function.swfgradient.html"
><B
CLASS="function"
>swfgradient()</B
></A
> 
     object. The flags argument can be one of the following values :  
     SWFFILL_RADIAL_GRADIENT or SWFFILL_LINEAR_GRADIENT. Default is 
     SWFFILL_LINEAR_GRADIENT. I'm sure about this one. Really. 
    </P
><P
>&#13;     <B
CLASS="function"
>swfshape-&#62;addfill()</B
> returns an <A
HREF="function.swffill.html"
><B
CLASS="function"
>swffill()</B
></A
>
     object for use with the <B
CLASS="function"
>swfshape-&#62;setleftfill()</B
> 
     and <B
CLASS="function"
>swfshape-&#62;setrightfill()</B
> functions 
     described below. 
    </P
><P
>&#13;     See also
     <B
CLASS="function"
>swfshape-&#62;setleftfill()</B
> and
     <B
CLASS="function"
>swfshape-&#62;setrightfill()</B
>.
    </P
><P
>&#13;     This simple example will draw a frame on a bitmap. Ah, here's another buglet in 
     the flash player- it doesn't seem to care about the second shape's bitmap's
     transformation in a morph. According to spec, the bitmap should stretch 
     along with the shape in this example.. 
     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN54320"
></A
><P
><B
>Example 1. <B
CLASS="function"
>swfshape-&#62;addfill()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;?php

  $p = new SWFMorph();

  $b = new SWFBitmap("alphafill.jpg");
  // use your own bitmap
  $width = $b-&#62;getWidth();
  $height = $b-&#62;getHeight();

  $s = $p-&#62;getShape1();
  $f = $s-&#62;addFill($b, SWFFILL_TILED_BITMAP);
  $f-&#62;moveTo(-$width/2, -$height/4);
  $f-&#62;scaleTo(1.0, 0.5);
  $s-&#62;setLeftFill($f);
  $s-&#62;movePenTo(-$width/2, -$height/4);
  $s-&#62;drawLine($width, 0);
  $s-&#62;drawLine(0, $height/2);
  $s-&#62;drawLine(-$width, 0);
  $s-&#62;drawLine(0, -$height/2);

  $s = $p-&#62;getShape2();
  $f = $s-&#62;addFill($b, SWFFILL_TILED_BITMAP);

  // these two have no effect!
  $f-&#62;moveTo(-$width/4, -$height/2);
  $f-&#62;scaleTo(0.5, 1.0);

  $s-&#62;setLeftFill($f);
  $s-&#62;movePenTo(-$width/4, -$height/2);
  $s-&#62;drawLine($width/2, 0);
  $s-&#62;drawLine(0, $height);
  $s-&#62;drawLine(-$width/2, 0);
  $s-&#62;drawLine(0, -$height);

  $m = new SWFMovie();
  $m-&#62;setDimension($width, $height);
  $i = $m-&#62;add($p);
  $i-&#62;moveTo($width/2, $height/2);

  for($n=0; $n&#60;1.001; $n+=0.03)
  {
    $i-&#62;setRatio($n);
    $m-&#62;nextFrame();
  }

  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.swfmovie.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.drawcurve.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>SWFMovie</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;drawCurve</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>