⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qbitmap.3qt

📁 Trolltech公司发布的基于C++图形开发环境
💻 3QT
字号:
'\" t.TH QBitmap 3qt "24 January 2005" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQBitmap \- Monochrome (1 bit depth) pixmaps.br.PP\fC#include <qbitmap.h>\fR.PPInherits QPixmap..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQBitmap\fR () ".br.ti -1c.BI "\fBQBitmap\fR ( int " "w" ", int " "h" ", bool " "clear" " = FALSE, QPixmap::Optimization = QPixmap::DefaultOptim ) ".br.ti -1c.BI "\fBQBitmap\fR ( const QSize &, bool " "clear" " = FALSE, QPixmap::Optimization = QPixmap::DefaultOptim ) ".br.ti -1c.BI "\fBQBitmap\fR ( int " "w" ", int " "h" ", const uchar * " "bits" ", bool " "isXbitmap" "=FALSE ) ".br.ti -1c.BI "\fBQBitmap\fR ( const QSize &, const uchar * " "bits" ", bool " "isXbitmap" "=FALSE ) ".br.ti -1c.BI "\fBQBitmap\fR ( const QBitmap & ) ".br.ti -1c.BI "\fBQBitmap\fR ( const QString & " "fileName" ", const char * " "format" "=0 ) ".br.ti -1c.BI "QBitmap& \fBoperator=\fR ( const QBitmap & ) ".br.ti -1c.BI "QBitmap& \fBoperator=\fR ( const QPixmap & ) ".br.ti -1c.BI "QBitmap& \fBoperator=\fR ( const QImage & ) ".br.ti -1c.BI "QBitmap \fBxForm\fR ( const QWMatrix & ) const".br.in -1c.SH DESCRIPTIONThe QBitmap class provides monochrome (1 bit depth) pixmaps..PPThe QBitmap class is a monochrome off-screen paint device, used mainly for creating custom QCursor and QBrush objects, in QPixmap::setMask() and for QRegion..PPA QBitmap is a QPixmap with a QPixmap::depth() of 1. If a pixmap with a depth greater than 1 is assigned to a bitmap, the bitmap will be automatically dithered. A QBitmap is guaranteed to always have the depth 1, unless it is QPixmap::isNull() (has depth 0)..PPWhen drawing in a QBitmap (or QPixmap with depth 1), we recommend using the QColor objects \fCQt::color0\fR and \fCQt::color1.\fR Painting with \fCcolor0\fR sets the bitmap bits to 0, and painting with \fCcolor1\fR sets the bits to 1. For a bitmap, 0-bits indicate background (or white) and 1-bits indicate foreground (or black). Using the \fCblack\fR and \fCwhite\fR QColor objects make no sense, because the QColor::pixel() value is not necessarily 0 for black and 1 for white..PPJust like the QPixmap class, QBitmap is optimized by the use of implicit sharing, so it is very efficient to pass QBitmap objects as arguments..PPSee also QPixmap, QPainter::drawPixmap(), bitBlt() and Shared Classes.PPExamples:.(lcursor/cursor.cpp.)l.SH MEMBER FUNCTION DOCUMENTATION.SH "QBitmap::QBitmap ()"Constructs a null bitmap..PPSee also QPixmap::isNull()..SH "QBitmap::QBitmap ( const QString & fileName, const char * format=0 )"Constructs a pixmap from the file \fIfileName.\fR If the file does not exist, or is of an unknown format, the pixmap becomes a null pixmap..PPThe parameters are passed on to QPixmap::load(). Dithering will be performed if the file format uses more than 1 bit per pixel..PPSee also QPixmap::isNull(), QPixmap::load(), QPixmap::loadFromData(), QPixmap::save() and QPixmap::imageFormat()..SH "QBitmap::QBitmap ( const QBitmap & bitmap )"Constructs a bitmap which is a copy of \fIbitmap.\fR.SH "QBitmap::QBitmap ( int w, int h, bool clear = FALSE, QPixmap::Optimization optimization = QPixmap::DefaultOptim )"Constructs a bitmap with \fIw\fR width and \fIh\fR height..PPThe contents of the bitmap is uninitialized if \fIclear\fR is FALSE, otherwise it is filled with pixel value 0 (the QColor \fCQt::color0).\fR.PPThe optional \fIoptimization\fR argument specifies the optimization setting for the bitmap. The default optimization should be used in most cases. Games and other pixmap-intensive applications may benefit from setting this argument..PPSee also QPixmap::setOptimization() and QPixmap::setDefaultOptimization()..SH "QBitmap::QBitmap ( int w, int h, const uchar * bits, bool isXbitmap=FALSE )"Constructs a bitmap with \fIw\fR width and \fIh\fR height and sets the contents to \fIbits.\fR.PPThe \fIisXbitmap\fR should be TRUE if \fIbits\fR was generated by the X11 bitmap program. The X bitmap bit order is little endian. The QImage documentation discusses bit order of monochrome images..PPExample (creates an arrow bitmap):.PP.nf.br    uchar arrow_bits[] = { 0x3f, 0x1f, 0x0f, 0x1f, 0x3b, 0x71, 0xe0, 0xc0 };.br    QBitmap bm( 8, 8, arrow_bits, TRUE );.fi.SH "QBitmap::QBitmap ( const QSize & size, bool clear = FALSE, QPixmap::Optimization optimization = QPixmap::DefaultOptim )"This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts..SH "QBitmap::QBitmap ( const QSize & size, const uchar * bits, bool isXbitmap=FALSE )"This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts..SH "QBitmap & QBitmap::operator= ( const QImage & image )"Converts the image \fIimage\fR to a bitmap and assigns the result to this bitmap. Returns a reference to the bitmap..PPDithering will be performed if the image has a QImage::depth() greater than 1..SH "QBitmap & QBitmap::operator= ( const QPixmap & pixmap )"Assigns the pixmap \fIpixmap\fR to this bitmap and returns a reference to this bitmap..PPDithering will be performed if the pixmap has a QPixmap::depth() greater than 1..SH "QBitmap & QBitmap::operator= ( const QBitmap & bitmap )"Assigns the bitmap \fIbitmap\fR to this bitmap and returns a reference to this bitmap..SH "QBitmap QBitmap::xForm ( const QWMatrix & matrix ) const"Returns a transformed copy of this bitmap, using \fImatrix.\fR.PPThis function does exactly the same as QPixmap::xForm(), except that it returns a QBitmap instead of a QPixmap..PPSee also  QPixmap::xForm()..SH "SEE ALSO".BR http://doc.trolltech.com/qbitmap.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports make our job much simpler. Thank you..PIn case of content or formattting problems with this manual page, pleasereport them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qbitmap.3qt) and the Qtversion (2.3.10).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -