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

📄 qglcolormap.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QGLColormap 3qt "9 December 2002" "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 NAMEQGLColormap \- Used for installing custom colormaps into QGLWidgets.SH SYNOPSIS\fC#include <qglcolormap.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQGLColormap\fR ()".br.ti -1c.BI "\fBQGLColormap\fR ( const QGLColormap & map )".br.ti -1c.BI "\fB~QGLColormap\fR ()".br.ti -1c.BI "QGLColormap & \fBoperator=\fR ( const QGLColormap & map )".br.ti -1c.BI "bool \fBisEmpty\fR () const".br.ti -1c.BI "int \fBsize\fR () const".br.ti -1c.BI "void \fBdetach\fR ()".br.ti -1c.BI "void \fBsetEntries\fR ( int count, const QRgb * colors, int base = 0 )".br.ti -1c.BI "void \fBsetEntry\fR ( int idx, QRgb color )".br.ti -1c.BI "void \fBsetEntry\fR ( int idx, const QColor & color )".br.ti -1c.BI "QRgb \fBentryRgb\fR ( int idx ) const".br.ti -1c.BI "QColor \fBentryColor\fR ( int idx ) const".br.ti -1c.BI "int \fBfind\fR ( QRgb color ) const".br.ti -1c.BI "int \fBfindNearest\fR ( QRgb color ) const".br.in -1c.SH DESCRIPTIONThe QGLColormap class is used for installing custom colormaps into QGLWidgets..PPQGLColormap provides a platform independent way of specifying and installing indexed colormaps into QGLWidgets. QGLColormap is especially useful when using the OpenGL color-index mode..PPUnder X11 you must use an X server that supports either a \fCPseudoColor\fR or \fCDirectColor\fR visual class. If your X server currently only provides a \fCGrayScale\fR, \fCTrueColor\fR, \fCStaticColor\fR or \fCStaticGray\fR visual, you will not be able to allocate colorcells for writing. If this is the case, try setting your X server to 8 bit mode. It should then provide you with at least a \fCPseudoColor\fR visual. Note that you may experience colormap flashing if your X server is running in 8 bit mode..PPUnder Windows the size of the colormap is always set to 256 colors. Note that under Windows you can also install colormaps in child widgets..PPThis class uses explicit sharing (see Shared Classes)..PPExample of use:.PP.nf.br    #include <qapplication.h>.br    #include <qglcolormap.h>.br.br    int main().br    {.br        QApplication a( argc, argv );.br.br        MySuperGLWidget widget( 0 ); // A QGLWidget in color-index mode.br        QGLColormap colormap;.br.br        // This will fill the colormap with colors ranging from.br        // black to white..br        for ( int i = 0; i < colormap.size(); i++ ).br            colormap.setEntry( i, qRgb( i, i, i ) );.br.br        widget.setColormap( colormap );.br        widget.show();.br        return a.exec();.br    }.br.fi.PPSee also QGLWidget::setColormap(), QGLWidget::colormap(), Graphics Classes, and Image Processing Classes..SH MEMBER FUNCTION DOCUMENTATION.SH "QGLColormap::QGLColormap ()"Construct a QGLColormap..SH "QGLColormap::QGLColormap ( const QGLColormap & map )"Construct a shallow copy of \fImap\fR..SH "QGLColormap::~QGLColormap ()"Dereferences the QGLColormap and deletes it if this was the last reference to it..SH "void QGLColormap::detach ()"Detaches this QGLColormap from the shared block..SH "QColor QGLColormap::entryColor ( int idx ) const"Returns the QRgb value in the colorcell with index \fIidx\fR..SH "QRgb QGLColormap::entryRgb ( int idx ) const"Returns the QRgb value in the colorcell with index \fIidx\fR..SH "int QGLColormap::find ( QRgb color ) const"Returns the index of the color \fIcolor\fR. If \fIcolor\fR is not in the map, -1 is returned..SH "int QGLColormap::findNearest ( QRgb color ) const"Returns the index of the color that is the closest match to color \fIcolor\fR..SH "bool QGLColormap::isEmpty () const"Returns TRUE if the colormap is empty; otherwise returns FALSE. A colormap with no color values set is considered to be empty..SH "QGLColormap & QGLColormap::operator= ( const QGLColormap & map )"Assign a shallow copy of \fImap\fR to this QGLColormap..SH "void QGLColormap::setEntries ( int count, const QRgb * colors, int base = 0 )"Set an array of cells in this colormap. \fIcount\fR is the number of colors that should be set, \fIcolors\fR is the array of colors, and \fIbase\fR is the starting index..SH "void QGLColormap::setEntry ( int idx, QRgb color )"Set cell at index \fIidx\fR in the colormap to color \fIcolor\fR..SH "void QGLColormap::setEntry ( int idx, const QColor & color )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPSet the cell with index \fIidx\fR in the colormap to color \fIcolor\fR..SH "int QGLColormap::size () const"Returns the number of colorcells in the colormap..SH "SEE ALSO".BR http://doc.trolltech.com/qglcolormap.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 help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qglcolormap.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

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