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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # QPolygon Class Reference ## [[QtGui](index.htm) module] 該QPolygon類提供了使用精確到整數點的向量。[More...](#details) ### Methods * `__init__ (self)` * `__init__ (self, QPolygon?a)` * `__init__ (self, list-of-QPoint?v)` * `__init__ (self, QRect?rectangle, bool?closed?=?False)` * `__init__ (self, int?asize)` * `__init__ (self, list-of-int?points)` * `__init__ (self, QVariant?variant)` * `append (self, QPoint?value)` * `QPoint at (self, int?i)` * `QRect boundingRect (self)` * `clear (self)` * `bool contains (self, QPoint?value)` * `bool containsPoint (self, QPoint?pt, Qt.FillRule?fillRule)` * `int count (self, QPoint?value)` * `int count (self)` * `sip.voidptr data (self)` * `fill (self, QPoint?value, int?size?=?-1)` * `QPoint first (self)` * `int indexOf (self, QPoint?value, int?from?=?0)` * `insert (self, int?i, QPoint?value)` * `QPolygon intersected (self, QPolygon?r)` * `bool isEmpty (self)` * `QPoint last (self)` * `int lastIndexOf (self, QPoint?value, int?from?=?-1)` * `QPolygon mid (self, int?pos, int?length?=?-1)` * `QPoint point (self, int?index)` * `prepend (self, QPoint?value)` * `putPoints (self, int?index, int?firstx, int?firsty, ...)` * `putPoints (self, int?index, int?nPoints, QPolygon?fromPolygon, int?from?=?0)` * `remove (self, int?i)` * `remove (self, int?i, int?count)` * `replace (self, int?i, QPoint?value)` * `setPoint (self, int?index, QPoint?pt)` * `setPoint (self, int?index, int?x, int?y)` * `setPoints (self, list-of-int?points)` * `setPoints (self, int?firstx, int?firsty, ...)` * `int size (self)` * `QPolygon subtracted (self, QPolygon?r)` * `swap (self, QPolygon?other)` * `translate (self, int?dx, int?dy)` * `translate (self, QPoint?offset)` * `QPolygon translated (self, int?dx, int?dy)` * `QPolygon translated (self, QPoint?offset)` * `QPolygon united (self, QPolygon?r)` * `QPoint value (self, int?i)` * `QPoint value (self, int?i, QPoint?defaultValue)` ### Special Methods * `QPolygon __add__ (self, QPolygon?other)` * `int __contains__ (self, QPoint?value)` * `__delitem__ (self, int?i)` * `__delitem__ (self, slice?slice)` * `bool __eq__ (self, QPolygon?other)` * `QPoint __getitem__ (self, int?i)` * `QPolygon __getitem__ (self, slice?slice)` * `QPolygon __iadd__ (self, QPolygon?other)` * `QPolygon __iadd__ (self, QPoint?value)` * `__len__ (self)` * `object __lshift__ (self, QPoint?value)` * `QPolygon __mul__ (self, QMatrix?m)` * `QPolygon __mul__ (self, QTransform?m)` * `bool __ne__ (self, QPolygon?other)` * `__setitem__ (self, int?i, QPoint?value)` * `__setitem__ (self, slice?slice, QPolygon?list)` * * * ## Detailed Description 這個類可以醃制。 該QPolygon類提供了使用精確到整數點的向量。 一個QPolygon對象是[QVector](index.htm)\u003c[QPoint](qpoint.html)\u003e 。把點添加到QPolygon最簡單的方法是使用[QVector](index.htm)的流媒體運營商,如下圖所示: ``` QPolygon polygon; polygon << [QPoint](qpoint.html)(10, 20) << [QPoint](qpoint.html)(20, 30); ``` 除了由所提供的功能[QVector](index.htm), QPolygon提供了一些點的特定功能。 在一多邊形的每個點可以通過將其索引的檢索[point](qpolygon.html#point)()函數。要填充多邊形, QPolygon提供[setPoint](qpolygon.html#setPoint)( )函數來設置點給定的索引處,則[setPoints](qpolygon.html#setPoints)()函數中的多邊形組的所有點(它縮放到的點的給定數量),以及[putPoints](qpolygon.html#putPoints)( )函數拷貝了一些已知點成從指定的索引(如果需要調整大小的多邊形)多邊形。 QPolygon提供[boundingRect](qpolygon.html#boundingRect)()和[translate](qpolygon.html#translate)( )用于幾何函數的函數。使用[QMatrix.map](qmatrix.html#map)()函數QPolygons的更一般的變換。 該QPolygon類是[implicitly shared](index.htm#implicit-data-sharing)。 * * * ## Method Documentation ``` QPolygon.__init__ (self) ``` 構造一個多邊形,沒有分。 **See also** [QVector.isEmpty](index.htm#isEmpty)( ) 。 ``` QPolygon.__init__ (self, QPolygon?a) ``` 構造的給定的多邊形_size_。創建空的多邊形,如果_size_== 0 。 **See also** [QVector.isEmpty](index.htm#isEmpty)( ) 。 ``` QPolygon.__init__ (self, list-of-QPoint?v) ``` 構造給定的一個副本_polygon_。 **See also** [setPoints](qpolygon.html#setPoints)( ) 。 ``` QPolygon.__init__ (self, QRect?rectangle, bool?closed?=?False) ``` 構建了含有指定一個多邊形_points_。 **See also** [setPoints](qpolygon.html#setPoints)( ) 。 ``` QPolygon.__init__ (self, int?asize) ``` 構造一個多邊形從給定的_rectangle_。如果_closed_是假的,多邊形只包含四點順時針矩形下令,否則多邊形的第五點設置為_rectangle_,左上( ) 。 需要注意的是該矩形的右下角位于( rectangle.x ()+ rectangle.width () , rectangle.y ()+ rectangle.height ())。 **See also** [setPoints](qpolygon.html#setPoints)( ) 。 ``` QPolygon.__init__ (self, list-of-int?points) ``` ``` QPolygon.__init__ (self, QVariant?variant) ``` ``` QPolygon.append (self, QPoint?value) ``` ``` QPoint QPolygon.at (self, int?i) ``` [](qpoint.html) ``` QRect QPolygon.boundingRect (self) ``` [](qrect.html) [返回多邊形的邊界矩形,或](qrect.html)[QRect](qrect.html)( 0,0, 0,0) ,如果多邊形是空的。 **See also** [QVector.isEmpty](index.htm#isEmpty)( ) 。 ``` QPolygon.clear (self) ``` ``` bool QPolygon.contains (self, QPoint?value) ``` ``` bool QPolygon.containsPoint (self, QPoint?pt, Qt.FillRule?fillRule) ``` 返回True如果給定的_point_在多邊形內根據指定的_fillRule_否則返回False 。 此功能被引入Qt的4.3 。 ``` int QPolygon.count (self, QPoint?value) ``` ``` int QPolygon.count (self) ``` ``` sip.voidptr QPolygon.data (self) ``` ``` QPolygon.fill (self, QPoint?value, int?size?=?-1) ``` ``` QPoint QPolygon.first (self) ``` [ ``` int QPolygon.indexOf (self, QPoint?value, int?from?=?0) ``` ``` QPolygon.insert (self, int?i, QPoint?value) ``` ](qpoint.html) ``` QPolygon QPolygon.intersected (self, QPolygon?r) ``` [ 返回一個多邊形是這個多邊形的交點_r_。 對多邊形集合運算將視作為多邊形區域。非封閉的多邊形將被隱式關閉處理。 此功能被引入Qt的4.3 。 ``` bool QPolygon.isEmpty (self) ``` ](qpolygon.html) ``` QPoint QPolygon.last (self) ``` [ ``` int QPolygon.lastIndexOf (self, QPoint?value, int?from?=?-1) ``` ](qpoint.html) ``` QPolygon QPolygon.mid (self, int?pos, int?length?=?-1) ``` [](qpolygon.html) ``` QPoint QPolygon.point (self, int?index) ``` [ 提取的點的坐標在給定的_index_到*_x_和*_y_(如果它們是有效的指針)。 ](qpoint.html) [**See also**](qpoint.html) [setPoint](qpolygon.html#setPoint)( ) 。 ``` QPolygon.prepend (self, QPoint?value) ``` ``` QPolygon.putPoints (self, int?index, int?firstx, int?firsty, ...) ``` Copies _nPoints_從變量參數列表指出這個多邊形從給定的_index_。 該點被給定為一個整數序列,從_firstx_然后_firsty_,等等。多邊形調整大小,如果`index+nPoints`超過其目前的規模。 示例代碼用三個點(4,5) , (6,7 )創建了一個多邊形和(8,9) ,由1至3個點擴大多邊形: ``` [QPolygon](qpolygon.html) polygon(1); polygon[0] = [QPoint](qpoint.html)(4, 5); polygon.putPoints(1, 2, 6,7, 8,9); ``` 下面的代碼有相同的結果,但這里的putPoints ( )函數復蓋,而不是延伸: ``` [QPolygon](qpolygon.html) polygon(3); polygon.putPoints(0, 3, 4,5, 0,0, 8,9); polygon.putPoints(1, 1, 6,7); ``` **See also** [setPoints](qpolygon.html#setPoints)( ) 。 ``` QPolygon.putPoints (self, int?index, int?nPoints, QPolygon?fromPolygon, int?from?=?0) ``` ``` QPolygon.remove (self, int?i) ``` ``` QPolygon.remove (self, int?i, int?count) ``` ``` QPolygon.replace (self, int?i, QPoint?value) ``` ``` QPolygon.setPoint (self, int?index, QPoint?pt) ``` 設定點在給定的_index_到由指定的點(_x_,_y_) 。 **See also** [point](qpolygon.html#point)( )[putPoints](qpolygon.html#putPoints)()和[setPoints](qpolygon.html#setPoints)( ) 。 ``` QPolygon.setPoint (self, int?index, int?x, int?y) ``` 這是一個重載函數。 設定點在給定的_index_為給定的_point_。 ``` QPolygon.setPoints (self, list-of-int?points) ``` 調整大小的多邊形_nPoints_并用給定的填充它_points_。 示例代碼創建了兩個點( 10 , 20 )和( 30 , 40 )多邊形: ``` static const int points[] = { 10, 20, 30, 40 }; [QPolygon](qpolygon.html) polygon; polygon.setPoints(2, points); ``` **See also** [setPoint](qpolygon.html#setPoint)()和[putPoints](qpolygon.html#putPoints)( ) 。 ``` QPolygon.setPoints (self, int?firstx, int?firsty, ...) ``` 這是一個重載函數。 調整大小的多邊形_nPoints_并用可變參數列表中指定的點進行填充。該點被給定為一個整數序列,從_firstx_然后_firsty_,等等。 示例代碼創建了兩個點( 10 , 20 )和( 30 , 40 )多邊形: ``` [QPolygon](qpolygon.html) polygon; polygon.setPoints(2, 10, 20, 30, 40); ``` ``` int QPolygon.size (self) ``` ``` QPolygon QPolygon.subtracted (self, QPolygon?r) ``` [ 返回一個多邊形是_r_減去這個多邊形。 對多邊形集合運算將視作為多邊形區域。非封閉的多邊形將被隱式關閉處理。 此功能被引入Qt的4.3 。 ``` QPolygon.swap (self, QPolygon?other) ``` 掉期多邊形_other_與此多邊形。這個操作是非常快的,而且永遠不會。 此功能被引入Qt的4.8 。 ``` QPolygon.translate (self, int?dx, int?dy) ``` 由(將所有的點在多邊形_dx_,_dy_) 。 ](qpolygon.html) [**See also**](qpolygon.html) [translated](qpolygon.html#translated)( ) 。 ``` QPolygon.translate (self, QPoint?offset) ``` 這是一個重載函數。 由給定的轉換的所有點在多邊形_offset_。 **See also** [translated](qpolygon.html#translated)( ) 。 ``` QPolygon QPolygon.translated (self, int?dx, int?dy) ``` [ 返回由(翻譯多邊形的副本_dx_,_dy_) 。 此功能被引入Qt的4.6 。 ](qpolygon.html) [**See also**](qpolygon.html) [translate](qpolygon.html#translate)( ) 。 ``` QPolygon QPolygon.translated (self, QPoint?offset) ``` [ 這是一個重載函數。 返回該多邊形的一個副本,是由給定的翻譯_offset_。 此功能被引入Qt的4.6 。 ](qpolygon.html) [**See also**](qpolygon.html) [translate](qpolygon.html#translate)( ) 。 ``` QPolygon QPolygon.united (self, QPolygon?r) ``` [ 返回一個多邊形是這個多邊形和工會_r_。 對多邊形集合運算,將視作為多邊形區域,并含蓄地閉合多邊形。 此功能被引入Qt的4.3 。 ](qpolygon.html) [**See also**](qpolygon.html) [intersected](qpolygon.html#intersected)()和[subtracted](qpolygon.html#subtracted)( ) 。 ``` QPoint QPolygon.value (self, int?i) ``` [](qpoint.html) ``` QPoint QPolygon.value (self, int?i, QPoint?defaultValue) ``` [](qpoint.html) ``` QPolygon QPolygon.__add__ (self, QPolygon?other) ``` [ ``` int QPolygon.__contains__ (self, QPoint?value) ``` ``` QPolygon.__delitem__ (self, int?i) ``` ``` QPolygon.__delitem__ (self, slice?slice) ``` ``` bool QPolygon.__eq__ (self, QPolygon?other) ``` ](qpolygon.html) ``` QPoint QPolygon.__getitem__ (self, int?i) ``` [](qpoint.html) ``` QPolygon QPolygon.__getitem__ (self, slice?slice) ``` [](qpolygon.html) ``` QPolygon QPolygon.__iadd__ (self, QPolygon?other) ``` [](qpolygon.html) ``` QPolygon QPolygon.__iadd__ (self, QPoint?value) ``` [ ``` QPolygon.__len__ (self) ``` ``` object QPolygon.__lshift__ (self, QPoint?value) ``` ](qpolygon.html) ``` QPolygon QPolygon.__mul__ (self, QMatrix?m) ``` [](qpolygon.html) ``` QPolygon QPolygon.__mul__ (self, QTransform?m) ``` [ ``` bool QPolygon.__ne__ (self, QPolygon?other) ``` ``` QPolygon.__setitem__ (self, int?i, QPoint?value) ``` ``` QPolygon.__setitem__ (self, slice?slice, QPolygon?list) ``` ](qpolygon.html)
                  <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>

                              哎呀哎呀视频在线观看