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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # QGraphicsPixmapItem Class Reference ## [[QtGui](index.htm) module] 該QGraphicsPixmapItem類提供了一個圖片項目,你可以添加到[QGraphicsScene](qgraphicsscene.html)。[More...](#details) 繼承[QGraphicsItem](qgraphicsitem.html)。 ### Types * `enum ShapeMode { MaskShape, BoundingRectShape, HeuristicMaskShape }` ### Methods * `__init__ (self, QGraphicsItem?parent?=?None, QGraphicsScene?scene?=?None)` * `__init__ (self, QPixmap?pixmap, QGraphicsItem?parent?=?None, QGraphicsScene?scene?=?None)` * `QRectF boundingRect (self)` * `bool contains (self, QPointF?point)` * `bool isObscuredBy (self, QGraphicsItem?item)` * `QPointF offset (self)` * `QPainterPath opaqueArea (self)` * `paint (self, QPainter?painter, QStyleOptionGraphicsItem?option, QWidget?widget)` * `QPixmap pixmap (self)` * `setOffset (self, QPointF?offset)` * `setOffset (self, float?ax, float?ay)` * `setPixmap (self, QPixmap?pixmap)` * `setShapeMode (self, ShapeMode?mode)` * `setTransformationMode (self, Qt.TransformationMode?mode)` * `QPainterPath shape (self)` * `ShapeMode shapeMode (self)` * `Qt.TransformationMode transformationMode (self)` * `int type (self)` * * * ## Detailed Description 該QGraphicsPixmapItem類提供了一個圖片項目,你可以添加到[QGraphicsScene](qgraphicsscene.html)。 要設置項目的像素圖,通過一個[QPixmap](qpixmap.html)到QGraphicsPixmapItem的構造函數,或致電[setPixmap](qgraphicspixmapitem.html#setPixmap)()函數。該[pixmap](qgraphicspixmapitem.html#pixmap)( )函數返回當前像素圖。 QGraphicsPixmapItem使用像素圖的可選的alpha掩碼來提供合理的實施[boundingRect](qgraphicspixmapitem.html#boundingRect)( )[shape](qgraphicspixmapitem.html#shape)()和[contains](qgraphicspixmapitem.html#contains)( ) 。 ![](https://img.kancloud.cn/77/5d/775d055fa886e0033ea3e8aaf8d5e354_200x200.png) 像素圖被繪制在該項目的(0 ,0)坐標,所返回的[offset](qgraphicspixmapitem.html#offset)( ) 。你可以通過調用更改繪圖偏移[setOffset](qgraphicspixmapitem.html#setOffset)( ) 。 你可以通過調用設定的像素圖的轉型模式[setTransformationMode](qgraphicspixmapitem.html#setTransformationMode)( ) 。默認情況下,[Qt.FastTransformation](qt.html#TransformationMode-enum)使用時,可提供快速,非平滑縮放。[Qt.SmoothTransformation](qt.html#TransformationMode-enum) enables [QPainter.SmoothPixmapTransform](qpainter.html#RenderHint-enum)在畫家和質量取決于平臺和視口上。結果通常是不如叫QPixmap.scale ( )直接。通話[transformationMode](qgraphicspixmapitem.html#transformationMode)( )來獲得該項目目前的轉型模式。 * * * ## Type Documentation ``` QGraphicsPixmapItem.ShapeMode ``` 這個枚舉說明如何[QGraphicsPixmapItem](qgraphicspixmapitem.html)計算其形狀??和不透明的區域。 默認值是MaskShape 。 | Constant | Value | Description | | --- | --- | --- | | `QGraphicsPixmapItem.MaskShape` | `0` | 該形狀是通過調用確定[QPixmap.mask](qpixmap.html#mask)( ) 。這種形狀僅包括不透明像素的像素圖的。由于形狀比較復雜,但是,它可以比其它模式更慢,并且使用更多的存儲器。 | | `QGraphicsPixmapItem.BoundingRectShape` | `1` | 該形狀是由跟蹤像素映像的輪廓來確定。這是最快的形狀模式,但它并沒有考慮到的像素圖的任何透明區域。 | | `QGraphicsPixmapItem.HeuristicMaskShape` | `2` | 該形狀是通過調用確定[QPixmap.createHeuristicMask](qpixmap.html#createHeuristicMask)( ) 。性能和內存消耗是類似MaskShape 。 | * * * ## Method Documentation ``` QGraphicsPixmapItem.__init__ (self, QGraphicsItem?parent?=?None, QGraphicsScene?scene?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 該_scene_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個[QGraphicsPixmapItem](qgraphicspixmapitem.html)。_parent_被傳遞給[QGraphicsItem](qgraphicsitem.html)的構造。 **See also** [QGraphicsScene.addItem](qgraphicsscene.html#addItem)( ) 。 ``` QGraphicsPixmapItem.__init__ (self, QPixmap?pixmap, QGraphicsItem?parent?=?None, QGraphicsScene?scene?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 該_scene_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個[QGraphicsPixmapItem](qgraphicspixmapitem.html),使用_pixmap_作為默認的pixmap 。_parent_被傳遞給[QGraphicsItem](qgraphicsitem.html)的構造。 **See also** [QGraphicsScene.addItem](qgraphicsscene.html#addItem)( ) 。 ``` QRectF QGraphicsPixmapItem.boundingRect (self) ``` [](qrectf.html) [從重新實現](qrectf.html)[QGraphicsItem.boundingRect](qgraphicsitem.html#boundingRect)( ) 。 ``` bool QGraphicsPixmapItem.contains (self, QPointF?point) ``` 從重新實現[QGraphicsItem.contains](qgraphicsitem.html#contains)( ) 。 ``` bool QGraphicsPixmapItem.isObscuredBy (self, QGraphicsItem?item) ``` 從重新實現[QGraphicsItem.isObscuredBy](qgraphicsitem.html#isObscuredBy)( ) 。 ``` QPointF QGraphicsPixmapItem.offset (self) ``` [ 返回圖片項目的_offset_,它定義了像素圖的左上角,在局部坐標的點。 ](qpointf.html) [**See also**](qpointf.html) [setOffset](qgraphicspixmapitem.html#setOffset)( ) 。 ``` QPainterPath QGraphicsPixmapItem.opaqueArea (self) ``` [](qpainterpath.html) [從重新實現](qpainterpath.html)[QGraphicsItem.opaqueArea](qgraphicsitem.html#opaqueArea)( ) 。 ``` QGraphicsPixmapItem.paint (self, QPainter?painter, QStyleOptionGraphicsItem?option, QWidget?widget) ``` 從重新實現[QGraphicsItem.paint](qgraphicsitem.html#paint)( ) 。 ``` QPixmap QGraphicsPixmapItem.pixmap (self) ``` [](qpixmap.html) [返回該項目的像素圖,或無效](qpixmap.html)[QPixmap](qpixmap.html)如果沒有像素圖已定。 **See also** [setPixmap](qgraphicspixmapitem.html#setPixmap)( ) 。 ``` QGraphicsPixmapItem.setOffset (self, QPointF?offset) ``` 設置圖片項目的偏移量_offset_。[QGraphicsPixmapItem](qgraphicspixmapitem.html)將使用繪制其像素圖_offset_其左上角。 **See also** [offset](qgraphicspixmapitem.html#offset)( ) 。 ``` QGraphicsPixmapItem.setOffset (self, float?ax, float?ay) ``` 這個方便的功能等同于調用setOffset ([QPointF](qpointf.html)(_x_,_y_))。 此功能被引入Qt的4.3 。 ``` QGraphicsPixmapItem.setPixmap (self, QPixmap?pixmap) ``` 設置項的像素圖來_pixmap_。 **See also** [pixmap](qgraphicspixmapitem.html#pixmap)( ) 。 ``` QGraphicsPixmapItem.setShapeMode (self, ShapeMode?mode) ``` 設置項的形狀模式_mode_。形模式描述了如何[QGraphicsPixmapItem](qgraphicspixmapitem.html)計算出其形狀。默認模式是[MaskShape](qgraphicspixmapitem.html#ShapeMode-enum)。 **See also** [shapeMode](qgraphicspixmapitem.html#shapeMode)()和[ShapeMode](qgraphicspixmapitem.html#ShapeMode-enum)。 ``` QGraphicsPixmapItem.setTransformationMode (self, Qt.TransformationMode?mode) ``` 設置圖片項目的改造模式_mode_,并切換該項目的更新。默認模式是[Qt.FastTransformation](qt.html#TransformationMode-enum),它提供了無平滑快速轉型。 [Qt.SmoothTransformation](qt.html#TransformationMode-enum) enables [QPainter.SmoothPixmapTransform](qpainter.html#RenderHint-enum)在畫家和質量取決于平臺和視口上。結果通常是不如叫QPixmap.scale ( )直接。 **See also** [transformationMode](qgraphicspixmapitem.html#transformationMode)( ) 。 ``` QPainterPath QGraphicsPixmapItem.shape (self) ``` [](qpainterpath.html) [從重新實現](qpainterpath.html)[QGraphicsItem.shape](qgraphicsitem.html#shape)( ) 。 ``` ShapeMode QGraphicsPixmapItem.shapeMode (self) ``` [](qgraphicspixmapitem.html#ShapeMode-enum) [返回該項目的形狀模式。形模式描述了如何](qgraphicspixmapitem.html#ShapeMode-enum)[QGraphicsPixmapItem](qgraphicspixmapitem.html)計算出其形狀。默認模式是[MaskShape](qgraphicspixmapitem.html#ShapeMode-enum)。 **See also** [setShapeMode](qgraphicspixmapitem.html#setShapeMode)()和[ShapeMode](qgraphicspixmapitem.html#ShapeMode-enum)。 ``` Qt.TransformationMode QGraphicsPixmapItem.transformationMode (self) ``` [](qt.html#TransformationMode-enum) [返回像素圖的改造模式。默認模式是](qt.html#TransformationMode-enum)[Qt.FastTransformation](qt.html#TransformationMode-enum),它提供了無平滑快速轉型。 **See also** [setTransformationMode](qgraphicspixmapitem.html#setTransformationMode)( ) 。 ``` int QGraphicsPixmapItem.type (self) ``` 從重新實現[QGraphicsItem.type](qgraphicsitem.html#type)( ) 。
                  <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>

                              哎呀哎呀视频在线观看