<!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>The CairoFormat class</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.cairoextend.html">CairoExtend</a></div> <div class="next" style="text-align: right; float: right;"><a href="cairoformat.strideforwidth.html">CairoFormat::strideForWidth</a></div> <div class="up"><a href="book.cairo.html">Cairo</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="class.cairoformat" class="reference"> <h1 class="title">The CairoFormat class</h1> <div class="partintro"><p class="verinfo">(PECL cairo >= 0.1.0)</p> <div class="section" id="cairoformat.intro"> <h2 class="title">Introduction</h2> <p class="para"> CairoFormat enums are used to identify the memory format of the image data. </p> </div> <div class="section" id="cairoformat.synopsis"> <h2 class="title">Class synopsis</h2> <div class="classsynopsis"> <div class="ooclass"></div> <div class="classsynopsisinfo"> <span class="ooclass"> <strong class="classname">CairoFormat</strong> </span> {</div> <div class="classsynopsisinfo classsynopsisinfo_comment">/* Constants */</div> <div class="fieldsynopsis"> <span class="modifier">const</span> <span class="type">integer</span> <var class="fieldsynopsis_varname"><a href="class.cairoformat.html#cairoformat.constants.argb32"><var class="varname">ARGB32</var></a></var> <span class="initializer"> = 0</span> ;</div> <div class="fieldsynopsis"> <span class="modifier">const</span> <span class="type">integer</span> <var class="fieldsynopsis_varname"><a href="class.cairoformat.html#cairoformat.constants.rgb24"><var class="varname">RGB24</var></a></var> <span class="initializer"> = 1</span> ;</div> <div class="fieldsynopsis"> <span class="modifier">const</span> <span class="type">integer</span> <var class="fieldsynopsis_varname"><a href="class.cairoformat.html#cairoformat.constants.a8"><var class="varname">A8</var></a></var> <span class="initializer"> = 2</span> ;</div> <div class="fieldsynopsis"> <span class="modifier">const</span> <span class="type">integer</span> <var class="fieldsynopsis_varname"><a href="class.cairoformat.html#cairoformat.constants.a1"><var class="varname">A1</var></a></var> <span class="initializer"> = 3</span> ;</div> <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">int</span> <span class="methodname"><a href="cairoformat.strideforwidth.html" class="methodname">strideForWidth</a></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$format</code></span> , <span class="methodparam"><span class="type">int</span> <code class="parameter">$width</code></span> )</div> }</div> </div> <div class="section" id="cairoformat.constants"> <h2 class="title">Predefined Constants</h2> <dl> <dt id="cairoformat.constants.argb32"> <span class="term"><strong><code>CairoFormat::ARGB32</code></strong></span> <dd> <p class="para">Each pixel is a 32-bit quantity, with alpha in the upper 8 bits, then red, then green, then blue. The 32-bit quantities are stored native-endian. Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) </p> </dd> </dt> <dt id="cairoformat.constants.rgb24"> <span class="term"><strong><code>CairoFormat::RGB24</code></strong></span> <dd> <p class="para"> Each pixel is a 32-bit quantity, with the upper 8 bits unused. Red, Green, and Blue are stored in the remaining 24 bits in that order. </p> </dd> </dt> <dt id="cairoformat.constants.a8"> <span class="term"><strong><code>CairoFormat::A8</code></strong></span> <dd> <p class="para">Each pixel is a 8-bit quantity holding an alpha value.</p> </dd> </dt> <dt id="cairoformat.constants.a1"> <span class="term"><strong><code>CairoFormat::A1</code></strong></span> <dd> <p class="para">Each pixel is a 1-bit quantity holding an alpha value. Pixels are packed together into 32-bit quantities. The ordering of the bits matches the endianess of the platform. On a big-endian machine, the first pixel is in the uppermost bit, on a little-endian machine the first pixel is in the least-significant bit. </p> </dd> </dt> </dl> </div> </div> <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="cairoformat.strideforwidth.html">CairoFormat::strideForWidth</a> — Provides an appropiate stride to use</li></ul> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.cairoextend.html">CairoExtend</a></div> <div class="next" style="text-align: right; float: right;"><a href="cairoformat.strideforwidth.html">CairoFormat::strideForWidth</a></div> <div class="up"><a href="book.cairo.html">Cairo</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>