mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-25 09:38:03 +02:00
1b66e0cd96
Updated to en-revision Imagick and misc Co-authored-by: George Peter Banyard <girgias@php.net>
123 lines
3.1 KiB
XML
123 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 0f49e97eebd971ba0468bc1b7c6265fd457f60c8 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagickdraw.setfontstretch">
|
|
<refnamediv>
|
|
<refname>ImagickDraw::setFontStretch</refname>
|
|
<refpurpose>Configure l'étirement du texte</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>bool</type><methodname>ImagickDraw::setFontStretch</methodname>
|
|
<methodparam><type>int</type><parameter>fontStretch</parameter></methodparam>
|
|
</methodsynopsis>
|
|
&warn.undocumented.func;
|
|
<para>
|
|
Configure l'étirement du texte pour le dessin des annotations.
|
|
L'énumération <literal>AnyStretch</literal> sert de joker et
|
|
signifie "peu importe".
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>fontStretch</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Une des constantes <link linkend="imagick.constants.stretch">STRETCH</link>
|
|
(<literal>imagick::STRETCH_*</literal>).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.void;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>ImagickDraw::setFontStretch</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
function setFontStretch($fillColor, $strokeColor, $backgroundColor) {
|
|
|
|
$draw = new \ImagickDraw();
|
|
|
|
$draw->setStrokeColor($strokeColor);
|
|
$draw->setFillColor($fillColor);
|
|
$draw->setStrokeWidth(2);
|
|
$draw->setFontSize(36);
|
|
|
|
$fontStretchTypes = [
|
|
\Imagick::STRETCH_ULTRACONDENSED,
|
|
\Imagick::STRETCH_CONDENSED,
|
|
\Imagick::STRETCH_SEMICONDENSED,
|
|
\Imagick::STRETCH_SEMIEXPANDED,
|
|
\Imagick::STRETCH_EXPANDED,
|
|
\Imagick::STRETCH_EXTRAEXPANDED,
|
|
\Imagick::STRETCH_ULTRAEXPANDED,
|
|
\Imagick::STRETCH_ANY
|
|
];
|
|
|
|
$offset = 0;
|
|
foreach ($fontStretchTypes as $fontStretch) {
|
|
$draw->setFontStretch($fontStretch);
|
|
$draw->annotation(50, 75 + $offset, "Lorem Ipsum!");
|
|
$offset += 50;
|
|
}
|
|
|
|
$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
|
|
-->
|