1
0
mirror of https://github.com/php/doc-es.git synced 2026-03-26 08:22:08 +01:00
Files
archived-doc-es/reference/ming/swfgradient/construct.xml
Pedro Antonio Gil Rodríguez e706130ff8 Updated to the most recent version
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@322693 c90b9560-bf6c-de11-be94-00142212c4b1
2012-01-24 20:21:07 +00:00

104 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 0d604bbc9d3b741d53e7fac26f5b24c306751e9a Maintainer: seros Status: ready -->
<refentry xml:id="swfgradient.construct" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SWFGradient::__construct</refname>
<refpurpose>Crea un objeto de gradiente</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<methodname>SWFGradient::__construct</methodname>
<void/>
</methodsynopsis>
&warn.experimental.func;
<para>
<function>swfgradient</function> crea un nuevo objeto SWFGradient.
</para>
<simpara>
Después de añadir las entradas al gradiente, se puede usar el gradiente
en un relleno de forma con el método <function>swfshape::>addfill</function>.
</simpara>
<simpara>
SWFGradient tiene los siguientes métodos: <function>swfgradient::addentry</function>.
</simpara>
<para>
Este ejemplo dibujará un gradiente grande de negro a blanco como fondo,
y un disco rojizo en su centro.
<example>
<title>Ejemplo de <function>swfgradient</function></title>
<programlisting role="php">
<![CDATA[
<?php
$m = new SWFMovie();
$m->setDimension(320, 240);
$s = new SWFShape();
// primer gradiente- de negro a blanco
$g = new SWFGradient();
$g->addEntry(0.0, 0, 0, 0);
$g->addEntry(1.0, 0xff, 0xff, 0xff);
$f = $s->addFill($g, SWFFILL_LINEAR_GRADIENT);
$f->scaleTo(0.01);
$f->moveTo(160, 120);
$s->setRightFill($f);
$s->drawLine(320, 0);
$s->drawLine(0, 240);
$s->drawLine(-320, 0);
$s->drawLine(0, -240);
$m->add($s);
$s = new SWFShape();
// segundo gradiente- gradiente radial de rojo a transparente
$g = new SWFGradient();
$g->addEntry(0.0, 0xff, 0, 0, 0xff);
$g->addEntry(1.0, 0xff, 0, 0, 0);
$f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT);
$f->scaleTo(0.005);
$f->moveTo(160, 120);
$s->setRightFill($f);
$s->drawLine(320, 0);
$s->drawLine(0, 240);
$s->drawLine(-320, 0);
$s->drawLine(0, -240);
$m->add($s);
header('Content-type: application/x-shockwave-flash');
$m->output();
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->