mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 16:32:13 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@322693 c90b9560-bf6c-de11-be94-00142212c4b1
100 lines
2.5 KiB
XML
100 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 0d604bbc9d3b741d53e7fac26f5b24c306751e9a Maintainer: seros Status: ready -->
|
|
<refentry xml:id="swfmorph.construct" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>SWFMorph::__construct</refname>
|
|
<refpurpose>Crea un nuevo objeto SWFMorph</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<methodname>SWFMorph::__construct</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
&warn.experimental.func;
|
|
<para>
|
|
Crea un nuevo objeto <classname>SWFMorph</classname>.
|
|
</para>
|
|
<para>
|
|
También llamado "forma intermedia". Esta cosa le permite hacer esas cosas retorcidas
|
|
pegajosas que hacen que su ordenador se asfie. Oh, ¡disfrute!
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
Este sencillo ejemplo formará un gran cuadrado rojo dentro de un cuadrado
|
|
con borde azul más pequeño.
|
|
<example>
|
|
<title>Ejemplo de<function>swfmorph</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$p = new SWFMorph();
|
|
|
|
$s = $p->getShape1();
|
|
$s->setLine(0, 0, 0, 0);
|
|
|
|
/* Observe que esto es al revés de las formas normales (izquierda en lugar de derecha).
|
|
No tengo ni idea de por qué, pero parece funcionar.. */
|
|
|
|
$s->setLeftFill($s->addFill(0xff, 0, 0));
|
|
$s->movePenTo(-1000,-1000);
|
|
$s->drawLine(2000,0);
|
|
$s->drawLine(0,2000);
|
|
$s->drawLine(-2000,0);
|
|
$s->drawLine(0,-2000);
|
|
|
|
$s = $p->getShape2();
|
|
$s->setLine(60,0,0,0);
|
|
$s->setLeftFill($s->addFill(0, 0, 0xff));
|
|
$s->movePenTo(0,-1000);
|
|
$s->drawLine(1000,1000);
|
|
$s->drawLine(-1000,1000);
|
|
$s->drawLine(-1000,-1000);
|
|
$s->drawLine(1000,-1000);
|
|
|
|
$m = new SWFMovie();
|
|
$m->setDimension(3000,2000);
|
|
$m->setBackground(0xff, 0xff, 0xff);
|
|
|
|
$i = $m->add($p);
|
|
$i->moveTo(1500,1000);
|
|
|
|
for ($r=0.0; $r<=1.0; $r+=0.1) {
|
|
$i->setRatio($r);
|
|
$m->nextFrame();
|
|
}
|
|
|
|
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
|
|
-->
|