<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # QGLColormap Class Reference ## [[QtOpenGL](index.htm) module] 該QGLColormap類用于安裝自定義色彩映射成[QGLWidget](qglwidget.html)。[More...](#details) ### Methods * `__init__ (self)` * `__init__ (self, QGLColormap)` * `detach (self)` * `QColor entryColor (self, int?idx)` * `int entryRgb (self, int?idx)` * `int find (self, int?color)` * `int findNearest (self, int?color)` * `int handle (self)` * `bool isEmpty (self)` * `setEntries (self, list-of-int?colors, int?base?=?0)` * `setEntry (self, int?idx, int?color)` * `setEntry (self, int?idx, QColor?color)` * `setHandle (self, int?ahandle)` * `int size (self)` * * * ## Detailed Description 該QGLColormap類用于安裝自定義色彩映射成[QGLWidget](qglwidget.html)。 QGLColormap提供了指定和安裝索引顏色表的一個平臺獨立的方式[QGLWidget](qglwidget.html)。在使用OpenGL的顏色索引模式QGLColormap是特別有用的。 在X11下你必須使用支持無論是X服務器`PseudoColor` or `DirectColor`視覺類。如果你的X server目前只提供了一個`GrayScale`,`TrueColor`,`StaticColor` or `StaticGray`視覺,你將無法分配colorcells寫作。如果是這樣的話,試試你的X服務器設置為8位模式。那么它應該為你提供至少一個`PseudoColor`視覺。請注意,您可能會遇到顏色映射閃爍,如果你的X服務器在8位模式下運行。 該[size](qglcolormap.html#size)顏色表的( )總是被設置為256色。請注意,在Windows下,你也可以在子控件安裝的colormaps 。 這個類的使用[implicit sharing](index.htm)作為存儲器和速度的優化。 使用示例: ``` #include <QApplication> #include <QGLColormap> int main(int argc, char *argv[]) { [QApplication](qapplication.html) app(argc, argv); MySuperGLWidget widget; // a QGLWidget in color-index mode QGLColormap colormap; // This will fill the colormap with colors ranging from // black to white. const int size = 256; for (int i = 0; i < size; ++i) colormap.setEntry(i, qRgb(i, i, i)); widget.setColormap(colormap); widget.show(); return app.exec(); } ``` * * * ## Method Documentation ``` QGLColormap.__init__ (self) ``` 構建[QGLColormap](qglcolormap.html)。 ``` QGLColormap.__init__ (self, QGLColormap) ``` 構造的淺表副本_map_。 ``` QGLColormap.detach (self) ``` ``` QColor QGLColormap.entryColor (self, int?idx) ``` [](qcolor.html) [返回](qcolor.html)[QRgb](qcolor.html#QRgb-typedef)與指數colorcell值_idx_。 ``` int QGLColormap.entryRgb (self, int?idx) ``` 返回[QRgb](qcolor.html#QRgb-typedef)與指數colorcell值_idx_。 ``` int QGLColormap.find (self, int?color) ``` 返回的顏色的索引_color_。如果_color_未在地圖上,則返回-1。 ``` int QGLColormap.findNearest (self, int?color) ``` 返回最匹配顏色的顏色的索引_color_。 ``` int QGLColormap.handle (self) ``` ``` bool QGLColormap.isEmpty (self) ``` 返回True如果顏色表為空或不使用由[QGLWidget](qglwidget.html)否則返回False 。 未設置任何顏色值的顏色表被認為是空的。由于歷史原因,一個色圖,有顏色值設置,但它不使用由[QGLWidget](qglwidget.html)也被認為是空的。 比較[size](qglcolormap.html#size)( )與零,以確定該顏色表是空的,無論它是在使用中由一[QGLWidget](qglwidget.html)或沒有。 **See also** [size](qglcolormap.html#size)( ) 。 ``` QGLColormap.setEntries (self, list-of-int?colors, int?base?=?0) ``` 在此顏色映射設定單元的陣列。_count_是應該被設置的顏色的數量,_colors_是顏色的數組,并_base_是的起始索引。在所述第一元件_colors_設置在_base_在顏色表。 ``` QGLColormap.setEntry (self, int?idx, int?color) ``` 設置單元格的索引_idx_colormap中的顏色_color_。 ``` QGLColormap.setEntry (self, int?idx, QColor?color) ``` 這是一個重載函數。 索引設置單元格_idx_colormap中的顏色_color_。 ``` QGLColormap.setHandle (self, int?ahandle) ``` ``` int QGLColormap.size (self) ``` 返回colorcells的顏色表的數量。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看