<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.image.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.imagedashedline.php',
    1 => 'imagedashedline',
    2 => 'Zeichnet eine gestrichelte Linie',
  ),
  'up' => 
  array (
    0 => 'ref.image.php',
    1 => 'GD- und Image-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.imagecropauto.php',
    1 => 'imagecropauto',
  ),
  'next' => 
  array (
    0 => 'function.imagedestroy.php',
    1 => 'imagedestroy',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/image/functions/imagedashedline.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imagedashedline" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagedashedline</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imagedashedline</span> &mdash; <span class="dc-title">Zeichnet eine gestrichelte Linie</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.imagedashedline-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imagedashedline</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="class.gdimage.php" class="type GdImage">GdImage</a></span> <code class="parameter">$image</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$x1</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$y1</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$x2</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$y2</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$color</code></span><br>): <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span></div>

  <p class="para rdfs-comment">
   Diese Funktion ist veraltet. Stattdessen sollte eine Kombination von
   <span class="function"><a href="function.imagesetstyle.php" class="function">imagesetstyle()</a></span> und <span class="function"><a href="function.imageline.php" class="function">imageline()</a></span>
   verwendet werden.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.imagedashedline-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">image</code></dt><dd><p class="para">Ein <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span>-Objekt, das von einer der Funktionen zur Bilderzeugung, z. B.
<span class="function"><a href="function.imagecreatetruecolor.php" class="function">imagecreatetruecolor()</a></span>, zurückgegeben wurde.</p></dd>
    
     <dt><code class="parameter">x1</code></dt>
     <dd>
      <p class="para">
       x-Koordinate des oberen linken Punktes.
      </p>
     </dd>
    
    
     <dt><code class="parameter">y1</code></dt>
     <dd>
      <p class="para">
       y-Koordinate des oberen linken Punktes. 0,0 ist die obere linke Ecke des
       Bildes.
      </p>
     </dd>
    
    
     <dt><code class="parameter">x2</code></dt>
     <dd>
      <p class="para">
       x-Koordinate des unteren rechten Punktes.
      </p>
     </dd>
    
    
     <dt><code class="parameter">y2</code></dt>
     <dd>
      <p class="para">
       y-Koordinate des unteren rechten Punktes.
      </p>
     </dd>
    
    
     <dt><code class="parameter">color</code></dt>
     <dd>
      <p class="para">
       Die Füllfarbe. Eine Farbkennung, die mit <span class="function"><a href="function.imagecolorallocate.php" class="function">imagecolorallocate()</a></span> erzeugt wurde.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.imagedashedline-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt immer <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imagedashedline-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">image</code> erwartet nun eine
  <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span>-Instanz; vorher wurde eine gültige
  <code class="literal">gd</code>-<span class="type">Ressource</span> erwartet.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.imagedashedline-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>imagedashedline()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Erzeuge ein 100x100-Bild<br /></span><span style="color: #0000BB">$im </span><span style="color: #007700">= </span><span style="color: #0000BB">imagecreatetruecolor</span><span style="color: #007700">(</span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$white </span><span style="color: #007700">= </span><span style="color: #0000BB">imagecolorallocate</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">0xFF</span><span style="color: #007700">, </span><span style="color: #0000BB">0xFF</span><span style="color: #007700">, </span><span style="color: #0000BB">0xFF</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Zeichne die vertikale gestrichelte Linie<br /></span><span style="color: #0000BB">imagedashedline</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">25</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">75</span><span style="color: #007700">, </span><span style="color: #0000BB">$white</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Speichere das Bild<br /></span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #DD0000">'./dashedline.png'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:</p></div>
    <div class="mediaobject">
     
     <div class="imageobject">
      <img src="images/21009b70229598c6a80eef8b45bf282b-imagedashedline.png" alt="Ausgabe des Beispiels: imagedashedline()" width="100" height="100" />
     </div>
    </div>
   </div>
   <div class="example" id="example-2">
    <p><strong>Beispiel #2 Alternative zu <span class="function"><strong>imagedashedline()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Erzeuge ein 100x100-Bild<br /></span><span style="color: #0000BB">$im </span><span style="color: #007700">= </span><span style="color: #0000BB">imagecreatetruecolor</span><span style="color: #007700">(</span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$white </span><span style="color: #007700">= </span><span style="color: #0000BB">imagecolorallocate</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">0xFF</span><span style="color: #007700">, </span><span style="color: #0000BB">0xFF</span><span style="color: #007700">, </span><span style="color: #0000BB">0xFF</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Definiere den gewünschten Stil: die ersten 4 Pixel sind weiß und die<br />// nächsten 4 sind transparent. Dies erzeugt den Effekt einer gestrichelten Linie<br /></span><span style="color: #0000BB">$style </span><span style="color: #007700">= Array(<br />                </span><span style="color: #0000BB">$white</span><span style="color: #007700">,<br />                </span><span style="color: #0000BB">$white</span><span style="color: #007700">,<br />                </span><span style="color: #0000BB">$white</span><span style="color: #007700">,<br />                </span><span style="color: #0000BB">$white</span><span style="color: #007700">,<br />                </span><span style="color: #0000BB">IMG_COLOR_TRANSPARENT</span><span style="color: #007700">,<br />                </span><span style="color: #0000BB">IMG_COLOR_TRANSPARENT</span><span style="color: #007700">,<br />                </span><span style="color: #0000BB">IMG_COLOR_TRANSPARENT</span><span style="color: #007700">,<br />                </span><span style="color: #0000BB">IMG_COLOR_TRANSPARENT<br />                </span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">imagesetstyle</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">$style</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Zeichne die vertikale gestrichelte Linie<br /></span><span style="color: #0000BB">imageline</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">25</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">75</span><span style="color: #007700">, </span><span style="color: #0000BB">IMG_COLOR_STYLED</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Speichere das Bild<br /></span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #DD0000">'./imageline.png'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.imagedashedline-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.imagesetstyle.php" class="function" rel="rdfs-seeAlso">imagesetstyle()</a> - Set the style for line drawing</span></li>
   <li><span class="function"><a href="function.imageline.php" class="function" rel="rdfs-seeAlso">imageline()</a> - Zeichnet eine Linie</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>