You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qt3/doc/html/qpaintdevice.html

465 lines
24 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qpaintdevice_x11.cpp:47 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QPaintDevice Class</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">Home</font></a>
| <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
| <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QPaintDevice Class Reference</h1>
<p>The QPaintDevice class is the base class of objects that
can be painted.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qpaintdevice-h.html">qpaintdevice.h</a>&gt;</tt>
<p>Inherited by <a href="qwidget.html">QWidget</a>, <a href="qpixmap.html">QPixmap</a>, <a href="qpicture.html">QPicture</a>, and <a href="qprinter.html">QPrinter</a>.
<p><a href="qpaintdevice-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn>virtual <a href="#~QPaintDevice"><b>~QPaintDevice</b></a> ()</li>
<li class=fn>bool <a href="#isExtDev"><b>isExtDev</b></a> () const</li>
<li class=fn>bool <a href="#paintingActive"><b>paintingActive</b></a> () const</li>
<li class=fn>virtual HDC <b>handle</b> () const</li>
<li class=fn>virtual Qt::HANDLE <a href="#handle"><b>handle</b></a> () const</li>
<li class=fn>Display * <a href="#x11Display"><b>x11Display</b></a> () const</li>
<li class=fn>int <a href="#x11Screen"><b>x11Screen</b></a> () const</li>
<li class=fn>int <a href="#x11Depth"><b>x11Depth</b></a> () const</li>
<li class=fn>int <a href="#x11Cells"><b>x11Cells</b></a> () const</li>
<li class=fn>Qt::HANDLE <a href="#x11Colormap"><b>x11Colormap</b></a> () const</li>
<li class=fn>bool <a href="#x11DefaultColormap"><b>x11DefaultColormap</b></a> () const</li>
<li class=fn>void * <a href="#x11Visual"><b>x11Visual</b></a> () const</li>
<li class=fn>bool <a href="#x11DefaultVisual"><b>x11DefaultVisual</b></a> () const</li>
</ul>
<h2>Static Public Members</h2>
<ul>
<li class=fn>Display * <a href="#x11AppDisplay"><b>x11AppDisplay</b></a> ()</li>
<li class=fn>int <a href="#x11AppScreen"><b>x11AppScreen</b></a> ()</li>
<li class=fn>int <a href="#x11AppDpiX-2"><b>x11AppDpiX</b></a> ()</li>
<li class=fn>int <a href="#x11AppDpiY-2"><b>x11AppDpiY</b></a> ()</li>
<li class=fn>void <a href="#x11SetAppDpiX-2"><b>x11SetAppDpiX</b></a> ( int&nbsp;dpi )</li>
<li class=fn>void <a href="#x11SetAppDpiY-2"><b>x11SetAppDpiY</b></a> ( int&nbsp;dpi )</li>
<li class=fn>int <a href="#x11AppDepth-2"><b>x11AppDepth</b></a> ()</li>
<li class=fn>int <a href="#x11AppCells"><b>x11AppCells</b></a> ()</li>
<li class=fn>Qt::HANDLE <a href="#x11AppRootWindow"><b>x11AppRootWindow</b></a> ()</li>
<li class=fn>Qt::HANDLE <a href="#x11AppColormap"><b>x11AppColormap</b></a> ()</li>
<li class=fn>bool <a href="#x11AppDefaultColormap"><b>x11AppDefaultColormap</b></a> ()</li>
<li class=fn>void * <a href="#x11AppVisual"><b>x11AppVisual</b></a> ()</li>
<li class=fn>bool <a href="#x11AppDefaultVisual"><b>x11AppDefaultVisual</b></a> ()</li>
<li class=fn>int <a href="#x11AppDepth"><b>x11AppDepth</b></a> ( int&nbsp;screen )</li>
<li class=fn>int <a href="#x11AppCells-2"><b>x11AppCells</b></a> ( int&nbsp;screen )</li>
<li class=fn>Qt::HANDLE <a href="#x11AppRootWindow-2"><b>x11AppRootWindow</b></a> ( int&nbsp;screen )</li>
<li class=fn>Qt::HANDLE <a href="#x11AppColormap-2"><b>x11AppColormap</b></a> ( int&nbsp;screen )</li>
<li class=fn>void * <a href="#x11AppVisual-2"><b>x11AppVisual</b></a> ( int&nbsp;screen )</li>
<li class=fn>bool <a href="#x11AppDefaultColormap-2"><b>x11AppDefaultColormap</b></a> ( int&nbsp;screen )</li>
<li class=fn>bool <a href="#x11AppDefaultVisual-2"><b>x11AppDefaultVisual</b></a> ( int&nbsp;screen )</li>
<li class=fn>int <a href="#x11AppDpiX"><b>x11AppDpiX</b></a> ( int&nbsp;screen )</li>
<li class=fn>int <a href="#x11AppDpiY"><b>x11AppDpiY</b></a> ( int&nbsp;screen )</li>
<li class=fn>void <a href="#x11SetAppDpiX"><b>x11SetAppDpiX</b></a> ( int&nbsp;dpi, int&nbsp;screen )</li>
<li class=fn>void <a href="#x11SetAppDpiY"><b>x11SetAppDpiY</b></a> ( int&nbsp;dpi, int&nbsp;screen )</li>
</ul>
<h2>Protected Members</h2>
<ul>
<li class=fn><a href="#QPaintDevice"><b>QPaintDevice</b></a> ( uint&nbsp;devflags )</li>
<li class=fn>virtual bool <a href="#cmd"><b>cmd</b></a> ( int, QPainter *, QPDevCmdParam * )</li>
</ul>
<h2>Related Functions</h2>
<ul>
<li class=fn>void <a href="#bitBlt"><b>bitBlt</b></a> ( QPaintDevice&nbsp;*&nbsp;dst, int&nbsp;dx, int&nbsp;dy, const&nbsp;QPaintDevice&nbsp;*&nbsp;src, int&nbsp;sx, int&nbsp;sy, int&nbsp;sw, int&nbsp;sh, Qt::RasterOp&nbsp;rop, bool&nbsp;ignoreMask )</li>
<li class=fn>void <a href="#bitBlt-2"><b>bitBlt</b></a> ( QPaintDevice&nbsp;*&nbsp;dst, const&nbsp;QPoint&nbsp;&amp;&nbsp;dp, const&nbsp;QPaintDevice&nbsp;*&nbsp;src, const&nbsp;QRect&nbsp;&amp;&nbsp;sr, RasterOp&nbsp;rop )</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
The QPaintDevice class is the base class of objects that
can be painted.
<p>
<p> A paint device is an abstraction of a two-dimensional space that
can be drawn using a <a href="qpainter.html">QPainter</a>. The drawing capabilities are
implemented by the subclasses <a href="qwidget.html">QWidget</a>, <a href="qpixmap.html">QPixmap</a>, <a href="qpicture.html">QPicture</a> and
<a href="qprinter.html">QPrinter</a>.
<p> The default coordinate system of a paint device has its origin
located at the top-left position. X increases to the right and Y
increases downward. The unit is one pixel. There are several ways
to set up a user-defined coordinate system using the painter, for
example, using <a href="qpainter.html#setWorldMatrix">QPainter::setWorldMatrix</a>().
<p> Example (draw on a paint device):
<pre>
void MyWidget::paintEvent( <a href="qpaintevent.html">QPaintEvent</a> * )
{
<a href="qpainter.html">QPainter</a> p; // our painter
p.<a href="qpainter.html#begin">begin</a>( this ); // start painting the widget
p.<a href="qpainter.html#setPen">setPen</a>( red ); // red outline
p.<a href="qpainter.html#setBrush">setBrush</a>( yellow ); // yellow fill
p.<a href="qpainter.html#drawEllipse">drawEllipse</a>( 10, 20, 100,100 ); // 100x100 ellipse at position (10, 20)
p.<a href="qpainter.html#end">end</a>(); // painting done
}
</pre>
<p> The bit block transfer is an extremely useful operation for
copying pixels from one paint device to another (or to itself). It
is implemented as the global function <a href="#bitBlt">bitBlt</a>().
<p> Example (scroll widget contents 10 pixels to the right):
<pre>
<a href="#bitBlt">bitBlt</a>( myWidget, 10, 0, myWidget );
</pre>
<p> <b>Warning:</b> Qt requires that a <a href="qapplication.html">QApplication</a> object exists before
any paint devices can be created. Paint devices access window
system resources, and these resources are not initialized before
an application object is created.
<p>See also <a href="graphics.html">Graphics Classes</a> and <a href="images.html">Image Processing Classes</a>.
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QPaintDevice"></a>QPaintDevice::QPaintDevice ( uint&nbsp;devflags )<tt> [protected]</tt>
</h3>
Constructs a paint device with internal flags <em>devflags</em>. This
constructor can be invoked only from QPaintDevice subclasses.
<h3 class=fn><a name="~QPaintDevice"></a>QPaintDevice::~QPaintDevice ()<tt> [virtual]</tt>
</h3>
Destroys the paint device and frees window system resources.
<h3 class=fn>bool <a name="cmd"></a>QPaintDevice::cmd ( int, <a href="qpainter.html">QPainter</a>&nbsp;*, QPDevCmdParam * )<tt> [virtual protected]</tt>
</h3>
Internal virtual function that interprets drawing commands from
the painter.
<p> Implemented by subclasses that have no direct support for drawing
graphics (external paint devices, for example, <a href="qpicture.html">QPicture</a>).
<h3 class=fn>Qt::HANDLE <a name="handle"></a>QPaintDevice::handle () const<tt> [virtual]</tt>
</h3>
Returns the window system handle of the paint device, for
low-level access. Using this function is not portable.
<p> The HANDLE type varies with platform; see <a href="qpaintdevice-h.html">qpaintdevice.h</a> and
<a href="qwindowdefs-h.html">qwindowdefs.h</a> for details.
<p> <p>See also <a href="#x11Display">x11Display</a>().
<h3 class=fn>bool <a name="isExtDev"></a>QPaintDevice::isExtDev () const
</h3>
<p> Returns TRUE if the device is an external paint device; otherwise
returns FALSE.
<p> External paint devices cannot be <a href="#bitBlt">bitBlt</a>()'ed from. <a href="qpicture.html">QPicture</a> and
<a href="qprinter.html">QPrinter</a> are external paint devices.
<h3 class=fn>bool <a name="paintingActive"></a>QPaintDevice::paintingActive () const
</h3>
<p> Returns TRUE if the device is being painted, i.e. someone has
called <a href="qpainter.html#begin">QPainter::begin</a>() but not yet called <a href="qpainter.html#end">QPainter::end</a>() for
this device; otherwise returns FALSE.
<p> <p>See also <a href="qpainter.html#isActive">QPainter::isActive</a>().
<h3 class=fn>int <a name="x11AppCells"></a>QPaintDevice::x11AppCells ()<tt> [static]</tt>
</h3>
<p> Returns the number of entries in the colormap for the default
screen of the X display global to the application (X11
only). Using this function is not portable.
<p> <p>See also <a href="#x11Colormap">x11Colormap</a>().
<h3 class=fn>int <a name="x11AppCells-2"></a>QPaintDevice::x11AppCells ( int&nbsp;screen )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p>
<p> Returns the number of entries in the colormap for screen <em>screen</em>
of the X display global to the application (X11 only). Using this
function is not portable.
<p> <p>See also <a href="#x11Colormap">x11Colormap</a>().
<h3 class=fn>Qt::HANDLE <a name="x11AppColormap"></a>QPaintDevice::x11AppColormap ()<tt> [static]</tt>
</h3>
<p> Returns the colormap for the default screen of the X display
global to the application (X11 only). Using this function is not
portable.
<p> <p>See also <a href="#x11Cells">x11Cells</a>().
<h3 class=fn>Qt::HANDLE <a name="x11AppColormap-2"></a>QPaintDevice::x11AppColormap ( int&nbsp;screen )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p>
<p> Returns the colormap for screen <em>screen</em> of the X display global
to the application (X11 only). Using this function is not
portable.
<p> <p>See also <a href="#x11Cells">x11Cells</a>().
<h3 class=fn>bool <a name="x11AppDefaultColormap"></a>QPaintDevice::x11AppDefaultColormap ()<tt> [static]</tt>
</h3>
<p> Returns the default colormap for the default screen of the X
display global to the application (X11 only). Using this function
is not portable.
<p> <p>See also <a href="#x11Cells">x11Cells</a>().
<h3 class=fn>bool <a name="x11AppDefaultColormap-2"></a>QPaintDevice::x11AppDefaultColormap ( int&nbsp;screen )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p>
<p> Returns the default colormap for screen <em>screen</em> of the X display
global to the application (X11 only). Using this function is not
portable.
<p> <p>See also <a href="#x11Cells">x11Cells</a>().
<h3 class=fn>bool <a name="x11AppDefaultVisual"></a>QPaintDevice::x11AppDefaultVisual ()<tt> [static]</tt>
</h3>
<p> Returns TRUE if the Visual used is the default for the default
screen of the X display global to the application (X11 only);
otherwise returns FALSE. Using this function is not portable.
<h3 class=fn>bool <a name="x11AppDefaultVisual-2"></a>QPaintDevice::x11AppDefaultVisual ( int&nbsp;screen )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p>
<p> Returns TRUE if the Visual used is the default for screen
<em>screen</em> of the X display global to the application (X11 only);
otherwise returns FALSE. Using this function is not portable.
<h3 class=fn>int <a name="x11AppDepth"></a>QPaintDevice::x11AppDepth ( int&nbsp;screen )<tt> [static]</tt>
</h3>
<p> Returns the depth for screen <em>screen</em> of the X display global to
the application (X11 only). Using this function is not portable.
<p> <p>See also <a href="qpixmap.html#defaultDepth">QPixmap::defaultDepth</a>().
<h3 class=fn>int <a name="x11AppDepth-2"></a>QPaintDevice::x11AppDepth ()<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p>
<p> Returns the depth for the default screen of the X display global
to the application (X11 only). Using this function is not
portable.
<p> <p>See also <a href="qpixmap.html#defaultDepth">QPixmap::defaultDepth</a>().
<h3 class=fn>Display * <a name="x11AppDisplay"></a>QPaintDevice::x11AppDisplay ()<tt> [static]</tt>
</h3>
<p> Returns a pointer to the X display global to the application (X11
only). Using this function is not portable.
<p> <p>See also <a href="#handle">handle</a>().
<h3 class=fn>int <a name="x11AppDpiX"></a>QPaintDevice::x11AppDpiX ( int&nbsp;screen )<tt> [static]</tt>
</h3>
Returns the horizontal DPI of the X display (X11 only) for screen
<em>screen</em>. Using this function is not portable. See
<a href="qpaintdevicemetrics.html">QPaintDeviceMetrics</a> for portable access to related information.
Using this function is not portable.
<p> <p>See also <a href="#x11AppDpiY">x11AppDpiY</a>(), <a href="#x11SetAppDpiX">x11SetAppDpiX</a>(), and <a href="qpaintdevicemetrics.html#logicalDpiX">QPaintDeviceMetrics::logicalDpiX</a>().
<h3 class=fn>int <a name="x11AppDpiX-2"></a>QPaintDevice::x11AppDpiX ()<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Returns the horizontal DPI of the X display (X11 only) for the
default screen. Using this function is not portable. See
<a href="qpaintdevicemetrics.html">QPaintDeviceMetrics</a> for portable access to related information.
Using this function is not portable.
<h3 class=fn>int <a name="x11AppDpiY"></a>QPaintDevice::x11AppDpiY ( int&nbsp;screen )<tt> [static]</tt>
</h3>
Returns the vertical DPI of the X11 display (X11 only) for screen
<em>screen</em>. Using this function is not portable. See
<a href="qpaintdevicemetrics.html">QPaintDeviceMetrics</a> for portable access to related information.
Using this function is not portable.
<p> <p>See also <a href="#x11AppDpiX">x11AppDpiX</a>(), <a href="#x11SetAppDpiY">x11SetAppDpiY</a>(), and <a href="qpaintdevicemetrics.html#logicalDpiY">QPaintDeviceMetrics::logicalDpiY</a>().
<h3 class=fn>int <a name="x11AppDpiY-2"></a>QPaintDevice::x11AppDpiY ()<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Returns the vertical DPI of the X11 display (X11 only) for the
default screen. Using this function is not portable. See
<a href="qpaintdevicemetrics.html">QPaintDeviceMetrics</a> for portable access to related information.
Using this function is not portable.
<p> <p>See also <a href="#x11AppDpiX">x11AppDpiX</a>(), <a href="#x11SetAppDpiY">x11SetAppDpiY</a>(), and <a href="qpaintdevicemetrics.html#logicalDpiY">QPaintDeviceMetrics::logicalDpiY</a>().
<h3 class=fn>Qt::HANDLE <a name="x11AppRootWindow"></a>QPaintDevice::x11AppRootWindow ()<tt> [static]</tt>
</h3>
<p> Returns the root window for the default screen of the X display
global to the applicatoin (X11 only). Using this function is not
portable.
<h3 class=fn>Qt::HANDLE <a name="x11AppRootWindow-2"></a>QPaintDevice::x11AppRootWindow ( int&nbsp;screen )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p>
<p> Returns the root window for screen <em>screen</em> of the X display
global to the applicatoin (X11 only). Using this function is not
portable.
<h3 class=fn>int <a name="x11AppScreen"></a>QPaintDevice::x11AppScreen ()<tt> [static]</tt>
</h3>
<p> Returns the screen number on the X display global to the
application (X11 only). Using this function is not portable.
<h3 class=fn>void * <a name="x11AppVisual"></a>QPaintDevice::x11AppVisual ()<tt> [static]</tt>
</h3>
<p> Returns the Visual for the default screen of the X display global
to the application (X11 only). Using this function is not
portable.
<h3 class=fn>void * <a name="x11AppVisual-2"></a>QPaintDevice::x11AppVisual ( int&nbsp;screen )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p>
<p> Returns the Visual for screen <em>screen</em> of the X display global to
the application (X11 only). Using this function is not portable.
<h3 class=fn>int <a name="x11Cells"></a>QPaintDevice::x11Cells () const
</h3>
<p> Returns the number of entries in the colormap of the X display for
the paint device (X11 only). Using this function is not portable.
<p> <p>See also <a href="#x11Colormap">x11Colormap</a>().
<h3 class=fn>Qt::HANDLE <a name="x11Colormap"></a>QPaintDevice::x11Colormap () const
</h3>
<p> Returns the colormap of the X display for the paint device (X11
only). Using this function is not portable.
<p> <p>See also <a href="#x11Cells">x11Cells</a>().
<h3 class=fn>bool <a name="x11DefaultColormap"></a>QPaintDevice::x11DefaultColormap () const
</h3>
<p> Returns the default colormap of the X display for the paint device
(X11 only). Using this function is not portable.
<p> <p>See also <a href="#x11Cells">x11Cells</a>().
<h3 class=fn>bool <a name="x11DefaultVisual"></a>QPaintDevice::x11DefaultVisual () const
</h3>
<p> Returns the default Visual of the X display for the paint device
(X11 only). Using this function is not portable.
<h3 class=fn>int <a name="x11Depth"></a>QPaintDevice::x11Depth () const
</h3>
<p> Returns the depth of the X display for the paint device (X11
only). Using this function is not portable.
<p> <p>See also <a href="qpixmap.html#defaultDepth">QPixmap::defaultDepth</a>().
<h3 class=fn>Display * <a name="x11Display"></a>QPaintDevice::x11Display () const
</h3>
<p> Returns a pointer to the X display for the paint device (X11
only). Using this function is not portable.
<p> <p>See also <a href="#handle">handle</a>().
<h3 class=fn>int <a name="x11Screen"></a>QPaintDevice::x11Screen () const
</h3>
<p> Returns the screen number on the X display for the paint device
(X11 only). Using this function is not portable.
<h3 class=fn>void <a name="x11SetAppDpiX"></a>QPaintDevice::x11SetAppDpiX ( int&nbsp;dpi, int&nbsp;screen )<tt> [static]</tt>
</h3>
Sets the value returned by <a href="#x11AppDpiX">x11AppDpiX</a>() to <em>dpi</em> for screen
<em>screen</em>. The default is determined by the display configuration.
Changing this value will alter the scaling of fonts and many other
metrics and is not recommended. Using this function is not
portable.
<p> <p>See also <a href="#x11SetAppDpiY">x11SetAppDpiY</a>().
<h3 class=fn>void <a name="x11SetAppDpiX-2"></a>QPaintDevice::x11SetAppDpiX ( int&nbsp;dpi )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Sets the value returned by <a href="#x11AppDpiX">x11AppDpiX</a>() to <em>dpi</em> for the default
screen. The default is determined by the display configuration.
Changing this value will alter the scaling of fonts and many other
metrics and is not recommended. Using this function is not
portable.
<p>
<h3 class=fn>void <a name="x11SetAppDpiY"></a>QPaintDevice::x11SetAppDpiY ( int&nbsp;dpi, int&nbsp;screen )<tt> [static]</tt>
</h3>
Sets the value returned by <a href="#x11AppDpiY">x11AppDpiY</a>() to <em>dpi</em> for screen
<em>screen</em>. The default is determined by the display configuration.
Changing this value will alter the scaling of fonts and many other
metrics and is not recommended. Using this function is not
portable.
<p> <p>See also <a href="#x11SetAppDpiX">x11SetAppDpiX</a>().
<h3 class=fn>void <a name="x11SetAppDpiY-2"></a>QPaintDevice::x11SetAppDpiY ( int&nbsp;dpi )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Sets the value returned by <a href="#x11AppDpiY">x11AppDpiY</a>() to <em>dpi</em> for the default
screen. The default is determined by the display configuration.
Changing this value will alter the scaling of fonts and many other
metrics and is not recommended. Using this function is not
portable.
<h3 class=fn>void * <a name="x11Visual"></a>QPaintDevice::x11Visual () const
</h3>
<p> Returns the Visual of the X display for the paint device (X11
only). Using this function is not portable.
<hr><h2>Related Functions</h2>
<h3 class=fn>void <a name="bitBlt"></a>bitBlt ( <a href="qpaintdevice.html">QPaintDevice</a>&nbsp;*&nbsp;dst, int&nbsp;dx, int&nbsp;dy, const&nbsp;<a href="qpaintdevice.html">QPaintDevice</a>&nbsp;*&nbsp;src, int&nbsp;sx, int&nbsp;sy, int&nbsp;sw, int&nbsp;sh, <a href="qt.html#RasterOp-enum">Qt::RasterOp</a>&nbsp;rop, bool&nbsp;ignoreMask )
</h3>
<p> Copies a block of pixels from <em>src</em> to <em>dst</em>, perhaps merging
each pixel according to the <a href="qt.html#RasterOp-enum">raster operation</a>
<em>rop</em>. <em>sx</em>, <em>sy</em>
is the top-left pixel in <em>src</em> (0, 0) by default, <em>dx</em>, <em>dy</em> is
the top-left position in <em>dst</em> and <em>sw</em>, <em>sh</em> is the size of
the copied block (all of <em>src</em> by default).
<p> The most common values for <em>rop</em> are CopyROP and XorROP; the <a href="qt.html#RasterOp-enum">Qt::RasterOp</a> documentation defines all the possible values.
<p> If <em>ignoreMask</em> is FALSE (the default) and <em>src</em> is a
masked <a href="qpixmap.html">QPixmap</a>, the entire blit is masked by <em>src</em>->mask().
<p> If <em>src</em>, <em>dst</em>, <em>sw</em> or <em>sh</em> is 0, <a href="#bitBlt">bitBlt</a>() does nothing. If
<em>sw</em> or <em>sh</em> is negative bitBlt() copies starting at <em>sx</em> (and
respectively, <em>sy</em>) and ending at the right end (respectively,
bottom) of <em>src</em>.
<p> <em>src</em> must be a <a href="qwidget.html">QWidget</a> or QPixmap. You cannot blit from a
<a href="qprinter.html">QPrinter</a>, for example. bitBlt() does nothing if you attempt to
blit from an unsupported device.
<p> bitBlt() does nothing if <em>src</em> has a greater depth than <em>dst</em>.
If you need to for example, draw a 24-bit pixmap on an 8-bit
widget, you must use drawPixmap().
<h3 class=fn>void <a name="bitBlt-2"></a>bitBlt ( <a href="qpaintdevice.html">QPaintDevice</a>&nbsp;*&nbsp;dst, const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;dp, const&nbsp;<a href="qpaintdevice.html">QPaintDevice</a>&nbsp;*&nbsp;src, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;sr, RasterOp&nbsp;rop )
</h3>
<p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Overloaded <a href="#bitBlt">bitBlt</a>() with the destination point <em>dp</em> and source
rectangle <em>sr</em>.
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt 3.3.8</div>
</table></div></address></body>
</html>