Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 5425

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Create a new brush</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.printer-close.html">printer_close</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.printer-create-dc.html">printer_create_dc</a></div>
 <div class="up"><a href="ref.printer.html">Printer Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.printer-create-brush" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">printer_create_brush</h1>
  <p class="verinfo">(PECL printer SVN)</p><p class="refpurpose"><span class="refname">printer_create_brush</span> &mdash; <span class="dc-title">Create a new brush</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.printer-create-brush-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>printer_create_brush</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$style</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$color</code></span>
   )</div>

  <p class="para rdfs-comment">
   The function creates a new brush and returns a handle to it. A brush is
   used to fill shapes. For an example see
    <span class="function"><a href="function.printer-select-brush.html" class="function">printer_select_brush()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.printer-create-brush-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">style</code></em></span>
     <dd>

      <p class="para">
       <em><code class="parameter">style</code></em> must be one of the following constants:
       <ul class="itemizedlist">
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_BRUSH_SOLID</code></strong>:
          creates a brush with a solid color.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_BRUSH_DIAGONAL</code></strong>:
          creates a brush with a 45-degree upward left-to-right hatch ( / ).
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_BRUSH_CROSS</code></strong>:
          creates a brush with a cross hatch ( + ).
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_BRUSH_DIAGCROSS</code></strong>:
          creates a brush with a 45 cross hatch ( x ).
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_BRUSH_FDIAGONAL</code></strong>:
          creates a brush with a 45-degree downward left-to-right hatch ( \ ).
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_BRUSH_HORIZONTAL</code></strong>:
          creates a brush with a horizontal hatch ( - ).
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_BRUSH_VERTICAL</code></strong>:
          creates a brush with a vertical hatch ( | ).
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code>PRINTER_BRUSH_CUSTOM</code></strong>:
          creates a custom brush from an BMP file. The second parameter
          is used to specify the BMP instead of the RGB color code.
         </span>
        </li>
       </ul>
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">color</code></em></span>
     <dd>

      <p class="para">
       <em><code class="parameter">color</code></em> must be a color in RGB hex format, i.e. 
       &quot;<em>000000</em>&quot; for black.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.printer-create-brush-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns a brush handle or <strong><code>FALSE</code></strong> on error.
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.printer-close.html">printer_close</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.printer-create-dc.html">printer_create_dc</a></div>
 <div class="up"><a href="ref.printer.html">Printer Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>