mirror of
https://github.com/php/doc-es.git
synced 2026-03-24 07:22:16 +01:00
113 lines
3.0 KiB
XML
113 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 668b6fc28891062b1c96202009ccb70b7147740d Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no Maintainer: seros -->
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagickdraw.pathstart">
|
|
<refnamediv>
|
|
<refname>ImagickDraw::pathStart</refname>
|
|
<refpurpose>Declara el inicio de una lista de dibujo de trazados</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>bool</type><methodname>ImagickDraw::pathStart</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
&warn.undocumented.func;
|
|
<para>
|
|
Declara el inicio de una lista de dibujo de trazados que finaliza con un comando
|
|
DrawPathFinish() coincidente. Todos los demás comandos DrawPath deben estar encerrados
|
|
entre comandos DrawPathFinish(). Ésto es debido a que los comandos de dibujo de trazados
|
|
son comandos subordinados y no funcionan por sí mismos.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.void;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>ImagickDraw::pathStart</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
function pathStart($strokeColor, $fillColor, $backgroundColor) {
|
|
|
|
$draw = new \ImagickDraw();
|
|
|
|
$draw->setStrokeOpacity(1);
|
|
$draw->setStrokeColor($strokeColor);
|
|
$draw->setFillColor($fillColor);
|
|
|
|
$draw->setStrokeWidth(2);
|
|
$draw->setFontSize(72);
|
|
|
|
$draw->pathStart();
|
|
$draw->pathMoveToAbsolute(50, 50);
|
|
$draw->pathLineToAbsolute(100, 50);
|
|
$draw->pathLineToRelative(0, 50);
|
|
$draw->pathLineToHorizontalRelative(-50);
|
|
$draw->pathFinish();
|
|
|
|
$draw->pathStart();
|
|
$draw->pathMoveToAbsolute(50, 50);
|
|
$draw->pathMoveToRelative(300, 0);
|
|
$draw->pathLineToRelative(50, 0);
|
|
$draw->pathLineToVerticalRelative(50);
|
|
$draw->pathLineToHorizontalAbsolute(350);
|
|
$draw->pathclose();
|
|
$draw->pathFinish();
|
|
|
|
$draw->pathStart();
|
|
$draw->pathMoveToAbsolute(50, 300);
|
|
$draw->pathCurveToAbsolute(50, 300, 100, 200, 300, 300);
|
|
$draw->pathLineToVerticalAbsolute(350);
|
|
$draw->pathFinish();
|
|
|
|
$imagick = new \Imagick();
|
|
$imagick->newImage(500, 500, $backgroundColor);
|
|
$imagick->setImageFormat("png");
|
|
|
|
$imagick->drawImage($draw);
|
|
|
|
header("Content-Type: image/png");
|
|
echo $imagick->getImageBlob();
|
|
}
|
|
|
|
?>
|
|
]]>
|
|
</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
|
|
-->
|