<class name="QBitmap" doc="/** <p>The <a href="QBitmap.html#QBitmap(int, int)"><tt>QBitmap</tt></a> class provides monochrome (1-bit depth) pixmaps.</p> <p>The <a href="QBitmap.html#QBitmap(int, int)"><tt>QBitmap</tt></a> class is a monochrome off-screen paint device used mainly for creating custom <a href="QCursor.html"><tt>QCursor</tt></a> and <a href="QBrush.html"><tt>QBrush</tt></a> objects, constructing <a href="QRegion.html"><tt>QRegion</tt></a> objects, and for setting masks for pixmaps and widgets.</p> <p><a href="QBitmap.html#QBitmap(int, int)"><tt>QBitmap</tt></a> is a <a href="QPixmap.html#QPixmap()"><tt>QPixmap</tt></a> subclass ensuring a depth of 1, except for null objects which have a depth of 0. If a pixmap with a depth greater than 1 is assigned to a bitmap, the bitmap will be dithered automatically.</p> <p>Use the <a href="QColor.html"><tt>QColor</tt></a> objects Qt::color0 and Qt::color1 when drawing on a <a href="QBitmap.html#QBitmap(int, int)"><tt>QBitmap</tt></a> object (or a <a href="QPixmap.html#QPixmap()"><tt>QPixmap</tt></a> object with depth 1).</p> <p>Painting with Qt::color0 sets the bitmap bits to 0, and painting with Qt::color1 sets the bits to 1. For a bitmap, 0-bits indicate background (or transparent pixels) and 1-bits indicate foreground (or opaque pixels). Use the <a href="QBitmap.html#clear()"><tt>clear</tt></a> function to set all the bits to Qt::color0. Note that using the Qt::black and Qt::white colors make no sense because the QColor::pixel() value is not necessarily 0 for black and 1 for white.</p> <p>The <a href="QBitmap.html#QBitmap(int, int)"><tt>QBitmap</tt></a> class provides the <a href="QBitmap.html#transformed(com.trolltech.qt.gui.QMatrix)"><tt>transformed</tt></a> function returning a transformed copy of the bitmap; use the <a href="QMatrix.html"><tt>QMatrix</tt></a> argument to translate, scale, shear, and rotate the bitmap. In addition, <a href="QBitmap.html#QBitmap(int, int)"><tt>QBitmap</tt></a> provides the static fromData() function which returns a bitmap constructed from the given <tt>uchar</tt> data, and the static <a href="QBitmap.html#fromImage(com.trolltech.qt.gui.QImage, com.trolltech.qt.core.Qt.ImageConversionFlags)"><tt>fromImage</tt></a> function returning a converted copy of a <a href="QImage.html"><tt>QImage</tt></a> object.</p> <p>Just like the <a href="QPixmap.html#QPixmap()"><tt>QPixmap</tt></a> class, <a href="QBitmap.html#QBitmap(int, int)"><tt>QBitmap</tt></a> is optimized by the use of implicit data sharing. For more information, see the {Implicit Data Sharing} documentation.</p> @see <a href="QPixmap.html#QPixmap()"><tt>QPixmap</tt></a> @see <a href="QImage.html"><tt>QImage</tt></a> @see <a href="QImageReader.html"><tt>QImageReader</tt></a> @see <a href="QImageWriter.html"><tt>QImageWriter</tt></a> */"> <method name="public QBitmap(com.trolltech.qt.gui.QPixmap arg__1)" doc="/** <p>Constructs a bitmap that is a copy of the given <tt>arg__1</tt>.</p> <p>If the pixmap has a depth greater than 1, the resulting bitmap will be dithered automatically.</p> @see <tt>QPixmap::depth</tt> @see <a href="QBitmap.html#fromImage(com.trolltech.qt.gui.QImage, com.trolltech.qt.core.Qt.ImageConversionFlags)"><tt>fromImage</tt></a> @see <tt>fromData</tt> */"/> <method name="public QBitmap(com.trolltech.qt.core.QSize arg__1)" doc="/** <p>Constructs a bitmap with the given <tt>arg__1</tt>. The pixels in the bitmap are uninitialized.</p> @see <a href="QBitmap.html#clear()"><tt>clear</tt></a> */"/> <method name="public QBitmap()" doc="/** <p>Constructs a null bitmap.</p> @see <tt>QPixmap::isNull</tt> */"/> <method name="public QBitmap(int w, int h)" doc="/** <p>Constructs a bitmap with the given <tt>w</tt> and <tt>h</tt>. The pixels inside are uninitialized.</p> @see <a href="QBitmap.html#clear()"><tt>clear</tt></a> */"/> <method name="public final void clear()" doc="/** <p>Clears the bitmap, setting all its bits to Qt::color0.</p> */"/> <method name="public final com.trolltech.qt.gui.QBitmap transformed(com.trolltech.qt.gui.QTransform matrix)" doc="/** <p>Returns a copy of this bitmap, transformed according to the given <tt>matrix</tt>.</p> @see <tt>QPixmap::transformed</tt> */"/> <method name="public final com.trolltech.qt.gui.QBitmap transformed(com.trolltech.qt.gui.QMatrix arg__1)" doc="/** <p>This convenience function converts the <tt>arg__1</tt> to a <a href="QTransform.html"><tt>QTransform</tt></a> and calls the overloaded function.</p> */"/> <method name="public static com.trolltech.qt.gui.QBitmap fromImage(com.trolltech.qt.gui.QImage image, com.trolltech.qt.core.Qt.ImageConversionFlags flags)" doc="/** <p>Returns a copy of the given <tt>image</tt> converted to a bitmap using the specified image conversion <tt>flags</tt>.</p> @see <tt>fromData</tt> */"/> <method name="public static com.trolltech.qt.gui.QBitmap fromImage(com.trolltech.qt.gui.QImage image)" doc="/** <p>Equivalent to <a href="QBitmap.html#fromImage(com.trolltech.qt.gui.QImage, com.trolltech.qt.core.Qt.ImageConversionFlags)"><tt>fromImage</tt></a>(<tt>image</tt>, Qt::AutoColor). */"/> </class>