Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 4642

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qpixmap.cpp -->
<head>
  <title>Qt 4.6: Obsolete Members for QPixmap</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">Obsolete Members for QPixmap</h1>
<p><b>The following class members are obsolete.</b> They are provided to keep old source code working. We strongly advise against using them in new code.</p>
<p><ul><li><a href="qpixmap.html">QPixmap class reference</a></li></ul></p>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QPixmap </td><td class="memItemRight" valign="bottom"><b><a href="qpixmap-obsolete.html#alphaChannel">alphaChannel</a></b> () const&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qpixmap-obsolete.html#serialNumber">serialNumber</a></b> () const&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qpixmap-obsolete.html#setAlphaChannel">setAlphaChannel</a></b> ( const QPixmap &amp; <i>alphaChannel</i> )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
</table>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QPixmap/alphaChannel"></a>
<h3 class="fn"><a name="alphaChannel"></a>QPixmap QPixmap::alphaChannel () const</h3>
<p>Returns the alpha channel of the pixmap as a new grayscale <a href="qpixmap.html">QPixmap</a> in which each pixel's red, green, and blue values are given the alpha value of the original pixmap. The color depth of the returned pixmap is the system depth on X11 and 8-bit on Windows and Mac OS X.</p>
<p>You can use this function while debugging to get a visible image of the alpha channel. If the pixmap doesn't have an alpha channel, i.e&#x2e;, the alpha channel's value for all pixels equals 0xff), a null pixmap is returned. You can check this with the <tt>isNull()</tt> function.</p>
<p>We show an example:</p>
<pre>         pixmap = QPixmap(100, 100);
         pixmap.fill(Qt::transparent);

         QRadialGradient gradient(50, 50, 50, 50, 50);
         gradient.setColorAt(0, QColor::fromRgbF(1, 0, 0, 1));
         gradient.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0));
         QPainter painter(&amp;pixmap);
         painter.fillRect(0, 0, 100, 100, gradient);

         channelImage = pixmap.alphaChannel();
         update();</pre>
<p align="center"><img src="images/alphachannelimage.png" alt="The pixmap and channelImage QPixmaps" /></p><p><b>Warning:</b> This is an expensive operation. The alpha channel of the pixmap is extracted dynamically from the pixeldata. Most usecases of this function are covered by <a href="qpainter.html">QPainter</a> and compositionModes which will normally execute faster.</p>
<p>See also <a href="qpixmap-obsolete.html#setAlphaChannel">setAlphaChannel</a>() and <a href="qpixmap.html#pixmap-information">Pixmap Information</a>.</p>
<a name="//apple_ref/cpp/instm/QPixmap/serialNumber"></a>
<h3 class="fn"><a name="serialNumber"></a>int QPixmap::serialNumber () const</h3>
<p>Returns a number that identifies the contents of this <a href="qpixmap.html">QPixmap</a> object. Distinct <a href="qpixmap.html">QPixmap</a> objects can only have the same serial number if they refer to the same contents (but they don't have to).</p>
<p>Use <a href="qpixmap.html#cacheKey">cacheKey</a>() instead.</p>
<p><b>Warning:</b> The serial number doesn't necessarily change when the pixmap is altered. This means that it may be dangerous to use it as a cache key. For caching pixmaps, we recommend using the <a href="qpixmapcache.html">QPixmapCache</a> class whenever possible.</p>
<a name="//apple_ref/cpp/instm/QPixmap/setAlphaChannel"></a>
<h3 class="fn"><a name="setAlphaChannel"></a>void QPixmap::setAlphaChannel ( const QPixmap &amp; <i>alphaChannel</i> )</h3>
<p>Sets the alpha channel of this pixmap to the given <i>alphaChannel</i> by converting the <i>alphaChannel</i> into 32 bit and using the intensity of the RGB pixel values.</p>
<p>The effect of this function is undefined when the pixmap is being painted on.</p>
<p><b>Warning:</b> This is potentially an expensive operation. Most usecases for this function are covered by <a href="qpainter.html">QPainter</a> and compositionModes which will normally execute faster.</p>
<p>See also <a href="qpixmap-obsolete.html#alphaChannel">alphaChannel</a>() and <a href="qpixmap.html#pixmap-transformations">Pixmap Transformations</a>.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>