<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # QPaintDevice Class Reference ## [[QtGui](index.htm) module] 在一個QPaintDevice類是可繪對象的基類。[More...](#details) 通過繼承[QGLFramebufferObject](qglframebufferobject.html),[QGLPixelBuffer](qglpixelbuffer.html),[QImage](qimage.html),[QPicture](qpicture.html),[QPixmap](qpixmap.html),[QPrinter](qprinter.html),[QSvgGenerator](qsvggenerator.html)和[QWidget](qwidget.html)。 ### Types * `enum PaintDeviceMetric { PdmWidth, PdmHeight, PdmWidthMM, PdmHeightMM, ..., PdmPhysicalDpiY }` ### Methods * `__init__ (self)` * `int colorCount (self)` * `int depth (self)` * `int height (self)` * `int heightMM (self)` * `int logicalDpiX (self)` * `int logicalDpiY (self)` * `int metric (self, PaintDeviceMetric?metric)` * `int numColors (self)` * `QPaintEngine paintEngine (self)` * `bool paintingActive (self)` * `int physicalDpiX (self)` * `int physicalDpiY (self)` * `int width (self)` * `int widthMM (self)` * * * ## Detailed Description 在一個QPaintDevice類是可繪對象的基類。 一種涂料設備是一個二維空間的抽象,可以使用被繪制[QPainter](qpainter.html)。其默認的坐標系統的原點位于左上角的位置。 X增加的權利和Y向下增加。該單元是一個像素。 一個QPaintDevice的繪圖功能由目前實施[QWidget](qwidget.html),[QImage](qimage.html),[QPixmap](qpixmap.html),[QGLPixelBuffer](qglpixelbuffer.html),[QPicture](qpicture.html)和[QPrinter](qprinter.html)子類。 要實現一個新的后臺支持,您必須來自一個QPaintDevice和重新實現虛擬[paintEngine](qpaintdevice.html#paintEngine)( )函數來告訴[QPainter](qpainter.html)其中繪圖引擎應該被用來繪制這個特定的設備上。請注意,您還必須創建一個相應的繪圖引擎,能夠繪制在設備上,即派生自[QPaintEngine](qpaintengine.html)并重新實現其虛函數。 **Warning:**Qt的規定,[QApplication](qapplication.html)對象存在可以創建任何油漆設備之前。油漆設備訪問窗口的系統資源,并創建一個應用程序對象之前,這些資源不被初始化。 在一個QPaintDevice類提供了一些函數返回的各種設備指標:該[depth](qpaintdevice.html#depth)()函數返回它的比特深度(位平面的數量)。該[height](qpaintdevice.html#height)( )函數返回它的高度在默認坐標系統的單位(如像素[QPixmap](qpixmap.html)和[QWidget](qwidget.html)),而[heightMM](qpaintdevice.html#heightMM)( )返回設備的高度以毫米為單位。 Similiarily時,[width](qpaintdevice.html#width)()和[widthMM](qpaintdevice.html#widthMM)( )函數返回的設備在默認的寬度坐標系單位和以毫米為單位,分別。或者,受保護的[metric](qpaintdevice.html#metric)()函數可用于通過指定所希望的檢索度量信息[PaintDeviceMetric](qpaintdevice.html#PaintDeviceMetric-enum)作為參數。 該[logicalDpiX](qpaintdevice.html#logicalDpiX)()和[logicalDpiY](qpaintdevice.html#logicalDpiY)( )函數返回設備的每英寸的點數的水平和垂直分辨率。該[physicalDpiX](qpaintdevice.html#physicalDpiX)()和[physicalDpiY](qpaintdevice.html#physicalDpiY)( )函數也返回該設備以每英寸點數的分辨率,但要注意,如果邏輯和物理分辨率不同,相應的[QPaintEngine](qpaintengine.html)必須處理的映射。最后,該[colorCount](qpaintdevice.html#colorCount)( )函數返回不同的顏色可供繪制設備的數量。 * * * ## Type Documentation ``` QPaintDevice.PaintDeviceMetric ``` 描述了一個繪圖設備的各種指標。 | Constant | Value | Description | | --- | --- | --- | | `QPaintDevice.PdmWidth` | `1` | 涂料設備的默認寬度坐標系單位(如像素[QPixmap](qpixmap.html)和[QWidget](qwidget.html)) 。另請參閱[width](qpaintdevice.html#width)( ) 。 | | `QPaintDevice.PdmHeight` | `2` | 涂料設備的默認高度坐標系單位(如像素[QPixmap](qpixmap.html)和[QWidget](qwidget.html)) 。另請參閱[height](qpaintdevice.html#height)( ) 。 | | `QPaintDevice.PdmWidthMM` | `3` | 涂料設備以毫米為單位的寬度。另請參閱[widthMM](qpaintdevice.html#widthMM)( ) 。 | | `QPaintDevice.PdmHeightMM` | `4` | 涂料設備以毫米為單位的高度。另請參閱[heightMM](qpaintdevice.html#heightMM)( ) 。 | | `QPaintDevice.PdmNumColors` | `5` | 不同顏色可供油漆設備的數量。另請參閱[colorCount](qpaintdevice.html#colorCount)( ) 。 | | `QPaintDevice.PdmDepth` | `6` | 繪制設備的比特深度(位平面的數量)。另請參閱[depth](qpaintdevice.html#depth)( ) 。 | | `QPaintDevice.PdmDpiX` | `7` | 該設備每英寸的點數的水平分辨率。另請參閱[logicalDpiX](qpaintdevice.html#logicalDpiX)( ) 。 | | `QPaintDevice.PdmDpiY` | `8` | 該設備每英寸的點數的垂直分辨率。另請參閱[logicalDpiY](qpaintdevice.html#logicalDpiY)( ) 。 | | `QPaintDevice.PdmPhysicalDpiX` | `9` | 該設備每英寸的點數的水平分辨率。另請參閱[physicalDpiX](qpaintdevice.html#physicalDpiX)( ) 。 | | `QPaintDevice.PdmPhysicalDpiY` | `10` | 該設備每英寸的點數的垂直分辨率。另請參閱[physicalDpiY](qpaintdevice.html#physicalDpiY)( ) 。 | **See also** [metric](qpaintdevice.html#metric)( ) 。 * * * ## Method Documentation ``` QPaintDevice.__init__ (self) ``` 構造一個繪圖設備。此構造函數只能從子類調用[QPaintDevice](qpaintdevice.html)。 ``` int QPaintDevice.colorCount (self) ``` 返回不同的顏色可供繪制設備的數量。因為這個值是一個整數,它不會是足以代表在32位顯示的顏色的數量,在這種情況下INT_MAX被返回來代替。 ``` int QPaintDevice.depth (self) ``` 返回繪制設備的比特深度(位平面的數量)。 ``` int QPaintDevice.height (self) ``` 返回繪制設備的默認高度坐標系統的單位(如像素[QPixmap](qpixmap.html)和[QWidget](qwidget.html)) 。 **See also** [heightMM](qpaintdevice.html#heightMM)( ) 。 ``` int QPaintDevice.heightMM (self) ``` 返回漆裝置以毫米為單位的高度。由于平臺的限制,它可能無法使用這個函數來確定屏幕上的一個小部件的實際物理尺寸。 **See also** [height](qpaintdevice.html#height)( ) 。 ``` int QPaintDevice.logicalDpiX (self) ``` 返回以每英寸點數,這是計算的字體大小時使用的設備的水平分辨率。為X11 ,這通常是因為可以從計算同一[widthMM](qpaintdevice.html#widthMM)( ) 。 請注意,如果logicalDpiX ( )不等于[physicalDpiX](qpaintdevice.html#physicalDpiX)()時,相應的[QPaintEngine](qpaintengine.html)必須處理分辨率的映射。 **See also** [logicalDpiY](qpaintdevice.html#logicalDpiY)()和[physicalDpiX](qpaintdevice.html#physicalDpiX)( ) 。 ``` int QPaintDevice.logicalDpiY (self) ``` 返回以每英寸點數,這是計算的字體大小時使用的設備的垂直分辨率。為X11 ,這通常是因為可以從計算同一[heightMM](qpaintdevice.html#heightMM)( ) 。 請注意,如果logicalDpiY ( )不等于[physicalDpiY](qpaintdevice.html#physicalDpiY)()時,相應的[QPaintEngine](qpaintengine.html)必須處理分辨率的映射。 **See also** [logicalDpiX](qpaintdevice.html#logicalDpiX)()和[physicalDpiY](qpaintdevice.html#physicalDpiY)( ) 。 ``` int QPaintDevice.metric (self, PaintDeviceMetric?metric) ``` 返回度量信息對于給定的涂料設備_metric_。 **See also** [PaintDeviceMetric](qpaintdevice.html#PaintDeviceMetric-enum)。 ``` int QPaintDevice.numColors (self) ``` 此功能已被棄用。 使用[colorCount](qpaintdevice.html#colorCount)( )來代替。 返回不同的顏色可供繪制設備的數量。因為這個值是一個整數,它不會是足以代表在32位顯示的顏色的數量,在這種情況下INT_MAX被返回來代替。 ``` QPaintEngine QPaintDevice.paintEngine (self) ``` [ 這種方法是抽象的,應在任何子類中重新實現。 返回一個指針,指向繪圖引擎用于在設備上繪制。 ``` bool QPaintDevice.paintingActive (self) ``` ](qpaintengine.html) [如果返回設備當前正在繪制的,即有人叫真](qpaintengine.html)[QPainter.begin](qpainter.html#begin)(),但尚未被稱為[QPainter.end](qpainter.html#end)( )此設備,否則返回False 。 **See also** [QPainter.isActive](qpainter.html#isActive)( ) 。 ``` int QPaintDevice.physicalDpiX (self) ``` 返回以每英寸點數設備的水平分辨率。例如,在打印時,這項決議是指物理打印機的分辨率。在另一方面的邏輯DPI ,是指所使用的實際繪圖引擎的分辨率。 請注意,如果physicalDpiX ( )不等于[logicalDpiX](qpaintdevice.html#logicalDpiX)()時,相應的[QPaintEngine](qpaintengine.html)必須處理分辨率的映射。 **See also** [physicalDpiY](qpaintdevice.html#physicalDpiY)()和[logicalDpiX](qpaintdevice.html#logicalDpiX)( ) 。 ``` int QPaintDevice.physicalDpiY (self) ``` 返回以每英寸點數設備的水平分辨率。例如,在打印時,這項決議是指物理打印機的分辨率。在另一方面的邏輯DPI ,是指所使用的實際繪圖引擎的分辨率。 請注意,如果physicalDpiY ( )不等于[logicalDpiY](qpaintdevice.html#logicalDpiY)()時,相應的[QPaintEngine](qpaintengine.html)必須處理分辨率的映射。 **See also** [physicalDpiX](qpaintdevice.html#physicalDpiX)()和[logicalDpiY](qpaintdevice.html#logicalDpiY)( ) 。 ``` int QPaintDevice.width (self) ``` 返回繪制設備的默認寬度坐標系單位(如像素[QPixmap](qpixmap.html)和[QWidget](qwidget.html)) 。 **See also** [widthMM](qpaintdevice.html#widthMM)( ) 。 ``` int QPaintDevice.widthMM (self) ``` 返回漆裝置以毫米為單位的寬度。由于平臺的限制,它可能無法使用這個函數來確定屏幕上的一個小部件的實際物理尺寸。 **See also** [width](qpaintdevice.html#width)( ) 。
                  <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>

                              哎呀哎呀视频在线观看