.BI "void \fBbitBlt\fR ( TQPaintDevice * dst, int dx, int dy, const TQPaintDevice * src, int sx, int sy, int sw, int sh, TQt::RasterOp rop, bool ignoreMask )"
A paint device is an abstraction of a two-dimensional space that can be drawn using a TQPainter. The drawing capabilities are implemented by the subclasses TQWidget, TQPixmap, TQPicture and TQPrinter.
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 TQPainter::setWorldMatrix().
p.drawEllipse( 10, 20, 100,100 ); // 100x100 ellipse at position (10, 20)
.br
p.end(); // painting done
.br
}
.br
.fi
.PP
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 bitBlt().
.PP
Example (scroll widget contents 10 pixels to the right):
\fBWarning:\fR TQt requires that a QApplication 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.
Returns TRUE if the device is being painted, i.e. someone has called TQPainter::begin() but not yet called TQPainter::end() for this device; otherwise returns FALSE.
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.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns the number of entries in the colormap for screen \fIscreen\fR of the X display global to the application (X11 only). Using this function is not portable.
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.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns TRUE if the Visual used is the default for screen \fIscreen\fR of the X display global to the application (X11 only); otherwise returns FALSE. Using this function is not portable.
.SH "int TQPaintDevice::x11AppDpiX ( int screen )\fC [static]\fR"
Returns the horizontal DPI of the X display (X11 only) for screen \fIscreen\fR. Using this function is not portable. See TQPaintDeviceMetrics for portable access to related information. Using this function is not portable.
Returns the horizontal DPI of the X display (X11 only) for the default screen. Using this function is not portable. See TQPaintDeviceMetrics for portable access to related information. Using this function is not portable.
.SH "int TQPaintDevice::x11AppDpiY ( int screen )\fC [static]\fR"
Returns the vertical DPI of the X11 display (X11 only) for screen \fIscreen\fR. Using this function is not portable. See TQPaintDeviceMetrics for portable access to related information. Using this function is not portable.
Returns the vertical DPI of the X11 display (X11 only) for the default screen. Using this function is not portable. See TQPaintDeviceMetrics for portable access to related information. Using this function is not portable.
Sets the value returned by x11AppDpiX() to \fIdpi\fR for screen \fIscreen\fR. 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.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Sets the value returned by x11AppDpiX() to \fIdpi\fR 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.
Sets the value returned by x11AppDpiY() to \fIdpi\fR for screen \fIscreen\fR. 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.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Sets the value returned by x11AppDpiY() to \fIdpi\fR 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.
.SH "void bitBlt ( TQPaintDevice * dst, int dx, int dy, const TQPaintDevice * src, int sx, int sy, int sw, int sh, TQt::RasterOp rop, bool ignoreMask )"
Copies a block of pixels from \fIsrc\fR to \fIdst\fR, perhaps merging each pixel according to the raster operation \fIrop\fR. \fIsx\fR, \fIsy\fR is the top-left pixel in \fIsrc\fR (0, 0) by default, \fIdx\fR, \fIdy\fR is the top-left position in \fIdst\fR and \fIsw\fR, \fIsh\fR is the size of the copied block (all of \fIsrc\fR by default).
If \fIsrc\fR, \fIdst\fR, \fIsw\fR or \fIsh\fR is 0, bitBlt() does nothing. If \fIsw\fR or \fIsh\fR is negative bitBlt() copies starting at \fIsx\fR (and respectively, \fIsy\fR) and ending at the right end (respectively, bottom) of \fIsrc\fR.
\fIsrc\fR must be a TQWidget or TQPixmap. You cannot blit from a TQPrinter, for example. bitBlt() does nothing if you attempt to blit from an unsupported device.
bitBlt() does nothing if \fIsrc\fR has a greater depth than \fIdst\fR. If you need to for example, draw a 24-bit pixmap on an 8-bit widget, you must use drawPixmap().