mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 00:12:06 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@319577 c90b9560-bf6c-de11-be94-00142212c4b1
177 lines
4.6 KiB
XML
177 lines
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
|
<refentry xml:id="function.ps-begin-pattern" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ps_begin_pattern</refname>
|
|
<refpurpose>Iniciar un nuevo patrón</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>ps_begin_pattern</methodname>
|
|
<methodparam><type>resource</type><parameter>psdoc</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>width</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>height</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>xstep</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>ystep</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>painttype</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Inicia un nuevo patrón. Un patrón es como una página que contiene, por ejemplo, un dibujo
|
|
que puede ser utilizado par rellenar áreas. Se usa como un color llamando a la función
|
|
<function>ps_setcolor</function> y estableciendo el espacio de color a
|
|
<literal>pattern</literal>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>psdoc</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El identificador de recursos del fichero postscript,
|
|
como el devuelto por la función <function>ps_new</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>width</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El ancho del patrón en píxeles.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>height</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El alto del patrón en píxeles.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>x-step</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La distancia en píxeles de la ubicación del patrón en
|
|
dirección horizontal.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>y-step</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La distancia en píxeles de la ubicación del patrón en
|
|
dirección vertical.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>painttype</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Debe ser 1 ó 2.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
El identificador del patrón &return.falseforfailure;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Crear y usar un patrón</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$ps = ps_new();
|
|
|
|
if (!ps_open_file($ps, "patrón.ps")) {
|
|
print "No se puede abrir el fichero PostScript\n";
|
|
exit;
|
|
}
|
|
|
|
ps_set_parameter($ps, "warning", "true");
|
|
ps_set_info($ps, "Creator", "patrón.php");
|
|
ps_set_info($ps, "Author", "Uwe Steinmann");
|
|
ps_set_info($ps, "Title", "Ejemplo de patrón");
|
|
|
|
|
|
$patrón_ps = ps_begin_pattern($ps, 10.0, 10.0, 10.0, 10.0, 1);
|
|
ps_setlinewidth($ps, 0.2);
|
|
ps_setcolor($ps, "stroke", "rgb", 0.0, 0.0, 1.0, 0.0);
|
|
ps_moveto($ps, 0, 0);
|
|
ps_lineto($ps, 7, 7);
|
|
ps_stroke($ps);
|
|
ps_moveto($ps, 0, 7);
|
|
ps_lineto($ps, 7, 0);
|
|
ps_stroke($ps);
|
|
ps_end_pattern($ps);
|
|
|
|
ps_begin_page($ps, 596, 842);
|
|
ps_setcolor($ps, "both", "pattern", $patrón_ps, 0.0, 0.0, 0.0);
|
|
ps_rect($ps, 50, 400, 200, 200);
|
|
ps_fill($ps);
|
|
ps_end_page($ps);
|
|
|
|
ps_close($ps);
|
|
ps_delete($ps);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>ps_end_pattern</function></member>
|
|
<member><function>ps_setcolor</function></member>
|
|
<member><function>ps_shading_pattern</function></member>
|
|
</simplelist>
|
|
</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
|
|
-->
|
|
|