<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之旅 廣告
                # QTransform Class Reference ## [[QtGui](index.htm) module] 該QTransform類指定坐標系的2D變換。[More...](#details) ### Types * `enum TransformationType { TxNone, TxTranslate, TxScale, TxRotate, TxShear, TxProject }` ### Methods * `__init__ (self)` * `__init__ (self, float?m11, float?m12, float?m13, float?m21, float?m22, float?m23, float?m31, float?m32, float?m33?=?1)` * `__init__ (self, float?h11, float?h12, float?h13, float?h21, float?h22, float?h23)` * `__init__ (self, QMatrix?mtx)` * `__init__ (self, QTransform)` * `QTransform adjoint (self)` * `float det (self)` * `float determinant (self)` * `float dx (self)` * `float dy (self)` * `(QTransform, bool?invertible) inverted (self)` * `bool isAffine (self)` * `bool isIdentity (self)` * `bool isInvertible (self)` * `bool isRotating (self)` * `bool isScaling (self)` * `bool isTranslating (self)` * `float m11 (self)` * `float m12 (self)` * `float m13 (self)` * `float m21 (self)` * `float m22 (self)` * `float m23 (self)` * `float m31 (self)` * `float m32 (self)` * `float m33 (self)` * `(int?tx, int?ty) map (self, int?x, int?y)` * `(float?tx, float?ty) map (self, float?x, float?y)` * `QPoint map (self, QPoint?p)` * `QPointF map (self, QPointF?p)` * `QLine map (self, QLine?l)` * `QLineF map (self, QLineF?l)` * `QPolygonF map (self, QPolygonF?a)` * `QPolygon map (self, QPolygon?a)` * `QRegion map (self, QRegion?r)` * `QPainterPath map (self, QPainterPath?p)` * `QRect mapRect (self, QRect)` * `QRectF mapRect (self, QRectF)` * `QPolygon mapToPolygon (self, QRect?r)` * `reset (self)` * `QTransform rotate (self, float?angle, Qt.Axis?axis?=?Qt.ZAxis)` * `QTransform rotateRadians (self, float?angle, Qt.Axis?axis?=?Qt.ZAxis)` * `QTransform scale (self, float?sx, float?sy)` * `setMatrix (self, float?m11, float?m12, float?m13, float?m21, float?m22, float?m23, float?m31, float?m32, float?m33)` * `QTransform shear (self, float?sh, float?sv)` * `QMatrix toAffine (self)` * `QTransform translate (self, float?dx, float?dy)` * `QTransform transposed (self)` * `TransformationType type (self)` ### Static Methods * `QTransform fromScale (float?dx, float?dy)` * `QTransform fromTranslate (float?dx, float?dy)` * `bool quadToQuad (QPolygonF?one, QPolygonF?two, QTransform?result)` * `bool quadToSquare (QPolygonF?quad, QTransform?result)` * `bool squareToQuad (QPolygonF?square, QTransform?result)` ### Special Methods * `QTransform __add__ (self, float?n)` * `QTransform __div__ (self, float?n)` * `bool __eq__ (self, QTransform)` * `QTransform __iadd__ (self, float?num)` * `QTransform __idiv__ (self, float?div)` * `QTransform __imul__ (self, QTransform)` * `QTransform __imul__ (self, float?num)` * `QTransform __isub__ (self, float?num)` * `QTransform __mul__ (self, QTransform?o)` * `QTransform __mul__ (self, float?n)` * `bool __ne__ (self, QTransform)` * `QTransform __sub__ (self, float?n)` * * * ## Detailed Description 這個類可以醃制。 該QTransform類指定坐標系的2D變換。 一個轉換指定如何翻譯,縮放,剪切,旋轉或投影坐標系,并繪制圖形時,通常會使用。 QTransform不同于[QMatrix(obsolete)](qmatrix.html)中,這是一個真正的3×3矩陣,使透視變換。 QTransform的[toAffine](qtransform.html#toAffine)( )方法允許鑄造QTransform到[QMatrix(obsolete)](qmatrix.html)。如果一個透視變換已被指定的矩陣,則轉換將導致數據丟失。 QTransform是Qt推薦的轉換類。 一個QTransform對象可使用內置的[setMatrix](qtransform.html#setMatrix)( )[scale](qtransform.html#scale)( )[rotate](qtransform.html#rotate)( )[translate](qtransform.html#translate)()和[shear](qtransform.html#shear)()函數。另外,它可以通過施加建[basic matrix operations](#basic-matrix-operations)。該矩陣也可以被定義時構造,并且它可以使用被重置為單位矩陣(默認值)的[reset](qtransform.html#reset)()函數。 該QTransform類支持的圖形原語映射:一個給定的點,線,多邊形,區域或畫家路徑可以映射到由坐標系定義_this_使用矩陣[map](qtransform.html#map)()函數。在情況下的四邊形的,它的坐標可以用轉化的[mapRect](qtransform.html#mapRect)()函數。矩形也可以被改造成一個_polygon_(映射到定義的坐標系_this_矩陣),使用[mapToPolygon](qtransform.html#mapToPolygon)()函數。 QTransform提供[isIdentity](qtransform.html#isIdentity)()函數,如果矩陣是單位矩陣,并且該方法返回True,則[isInvertible](qtransform.html#isInvertible)( )函數如果矩陣是非奇異的(即AB = BA = I ),它返回True 。該[inverted](qtransform.html#inverted)( )函數返回一個倒置的副本_this_矩陣,如果它是可逆的(否則返回單位矩陣) ,以及[adjoint](qtransform.html#adjoint)( )返回矩陣的標準伴隨。此外, QTransform提供[determinant](qtransform.html#determinant)( )函數返回矩陣的行列式。 最后, QTransform類支持矩陣乘法,加法和減法,以及類的對象可以被串流播放,以及比較。 ### Rendering Graphics 在繪制圖形時,矩陣定義轉換,但實際轉換是由繪圖函數中執行[QPainter](qpainter.html)。 默認情況下,[QPainter](qpainter.html)操作相關聯的設備自己的坐標系上。標準坐標系統[QPaintDevice](qpaintdevice.html)有其原點位于左上角的位置。該_x_值向右增大;_y_值向下增大。有關完整說明,請參閱[coordinate system](index.htm)文檔。 [QPainter](qpainter.html)有功能,平移,縮放,剪切和旋轉坐標系統,而無需使用QTransform 。例如: | ![](https://img.kancloud.cn/9c/1d/9c1deda9a9b2e7adf1c79901e27eb132_152x150.png) | ``` void SimpleTransformation.paintEvent([QPaintEvent](qpaintevent.html) *) { [QPainter](qpainter.html) painter(this); painter.setPen([QPen](qpen.html)([Qt](qt.html).blue, 1, [Qt](qt.html).DashLine)); painter.drawRect(0, 0, 100, 100); painter.rotate(45); painter.setFont([QFont](qfont.html)("Helvetica", 24)); painter.setPen([QPen](qpen.html)([Qt](qt.html).black, 1)); painter.drawText(20, 10, "QTransform"); } ``` | 雖然這些功能都非常的方便,它可以更有效地建立一個QTransform和呼叫[QPainter.setTransform](qpainter.html#setTransform)( )如果你想執行一個以上的變換操作。例如: | ![](https://img.kancloud.cn/0d/22/0d22cbe49052cec0e868db1dbb18259f_132x136.png) | ``` void CombinedTransformation.paintEvent([QPaintEvent](qpaintevent.html) *) { [QPainter](qpainter.html) painter(this); painter.setPen([QPen](qpen.html)([Qt](qt.html).blue, 1, [Qt](qt.html).DashLine)); painter.drawRect(0, 0, 100, 100); QTransform transform; transform.translate(50, 50); transform.rotate(45); transform.scale(0.5, 1.0); painter.setTransform(transform); painter.setFont([QFont](qfont.html)("Helvetica", 24)); painter.setPen([QPen](qpen.html)([Qt](qt.html).black, 1)); painter.drawText(20, 10, "QTransform"); } ``` | ### Basic Matrix Operations ![](https://img.kancloud.cn/0a/24/0a2432f7806c7aa4ccc8093b75c087e5_225x225.png) 一個QTransform對象包含一個3× 3的矩陣。該`m31`(`dx`)和`m32`(`dy`)元素指定水平和垂直平移。該`m11`和`m22`元素指定水平和垂直縮放。該`m21`和`m12`元素指定水平和垂直_shearing_。最后,本`m13`和`m23`元素指定水平和垂直投影,與`m33`作為一個額外的投影系數。 使用下列公式QTransform轉換成在平面上的點到另一點: ``` x' = m11*x + m21*y + dx y' = m22*y + m12*x + dy if (is not affine) { w' = m13*x + m23*y + m33 x' /= w' y' /= w' } ``` The point _(x, y)_ is the original point, and _(x', y')_ is the transformed point. _(x', y')_ can be transformed back to _(x, y)_ by performing the same operation on the [inverted](qtransform.html#inverted)() matrix. The various matrix elements can be set when constructing the matrix, or by using the [setMatrix](qtransform.html#setMatrix)() function later on. They can also be manipulated using the [translate](qtransform.html#translate)(), [rotate](qtransform.html#rotate)(), [scale](qtransform.html#scale)() and [shear](qtransform.html#shear)() convenience functions. The currently set values can be retrieved using the [m11](qtransform.html#m11)(), [m12](qtransform.html#m12)(), [m13](qtransform.html#m13)(), [m21](qtransform.html#m21)(), [m22](qtransform.html#m22)(), [m23](qtransform.html#m23)(), [m31](qtransform.html#m31)(), [m32](qtransform.html#m32)(), [m33](qtransform.html#m33)(), [dx](qtransform.html#dx)() and [dy](qtransform.html#dy)() functions. Translation is the simplest transformation. Setting `dx` and `dy` will move the coordinate system `dx` units along the X axis and `dy` units along the Y axis. Scaling can be done by setting `m11` and `m22`. For example, setting `m11` to 2 and `m22` to 1.5 will double the height and increase the width by 50%. The identity matrix has `m11`, `m22`, and `m33` set to 1 (all others are set to 0) mapping a point to itself. Shearing is controlled by `m12` and `m21`. Setting these elements to values different from zero will twist the coordinate system. Rotation is achieved by setting both the shearing factors and the scaling factors. Perspective transformation is achieved by setting both the projection factors and the scaling factors. Here's the combined transformations example using basic matrix operations: | ![](https://img.kancloud.cn/f3/77/f3778644dcf415697744c76c9a6ae8ae_132x136.png) | ``` void BasicOperations.paintEvent([QPaintEvent](qpaintevent.html) *) { double pi = 3.14; double a = pi/180 * 45.0; double sina = sin(a); double cosa = cos(a); QTransform translationTransform(1, 0, 0, 1, 50.0, 50.0); QTransform rotationTransform(cosa, sina, -sina, cosa, 0, 0); QTransform scalingTransform(0.5, 0, 0, 1.0, 0, 0); QTransform transform; transform = scalingTransform * rotationTransform * translationTransform; [QPainter](qpainter.html) painter(this); painter.setPen([QPen](qpen.html)([Qt](qt.html).blue, 1, [Qt](qt.html).DashLine)); painter.drawRect(0, 0, 100, 100); painter.setTransform(transform); painter.setFont([QFont](qfont.html)("Helvetica", 24)); painter.setPen([QPen](qpen.html)([Qt](qt.html).black, 1)); painter.drawText(20, 10, "QTransform"); } ``` | * * * ## Type Documentation ``` QTransform.TransformationType ``` | Constant | Value | | --- | --- | | `QTransform.TxNone` | `0x00` | | `QTransform.TxTranslate` | `0x01` | | `QTransform.TxScale` | `0x02` | | `QTransform.TxRotate` | `0x04` | | `QTransform.TxShear` | `0x08` | | `QTransform.TxProject` | `0x10` | * * * ## Method Documentation ``` QTransform.__init__ (self) ``` 構造一個單位矩陣。 所有的元素都設置為零,除了`m11`和`m22`(指定刻度)和`m13`它被設置為1 。 **See also** [reset](qtransform.html#reset)( ) 。 ``` QTransform.__init__ (self, float?m11, float?m12, float?m13, float?m21, float?m22, float?m23, float?m31, float?m32, float?m33?=?1) ``` ``` QTransform.__init__ (self, float?h11, float?h12, float?h13, float?h21, float?h22, float?h23) ``` 構造一個矩陣的元素,_m11_,_m12_,_m13_,_m21_,_m22_,_m23_,_m31_,_m32_,_m33_。 **See also** [setMatrix](qtransform.html#setMatrix)( ) 。 ``` QTransform.__init__ (self, QMatrix?mtx) ``` 構造一個矩陣的元素,_m11_,_m12_,_m21_,_m22_,_dx_和_dy_。 **See also** [setMatrix](qtransform.html#setMatrix)( ) 。 ``` QTransform.__init__ (self, QTransform) ``` 構造一個矩陣,是給定一個副本_matrix_。注意,這個`m13`,`m23`和`m33`元件分別設置為0,0和1。 ``` QTransform QTransform.adjoint (self) ``` [ 返回該矩陣的伴隨。 ``` float QTransform.det (self) ``` ``` float QTransform.determinant (self) ``` 返回矩陣的行列式。 ``` float QTransform.dx (self) ``` 返回水平平移因子。 ](qtransform.html) [**See also**](qtransform.html) [m31](qtransform.html#m31)( )[translate](qtransform.html#translate)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` float QTransform.dy (self) ``` 返回垂直平移因子。 **See also** [translate](qtransform.html#translate)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` QTransform QTransform.fromScale (float?dx, float?dy) ``` [](qtransform.html) [創建其對應于縮放的矩陣_sx_水平和_sy_垂直。這是相同的](qtransform.html)[QTransform](qtransform.html#QTransform)( ) 。規模( SX , SY ),但稍快。 此功能被引入Qt的4.5 。 ``` QTransform QTransform.fromTranslate (float?dx, float?dy) ``` [](qtransform.html) [創建其對應于翻譯成矩陣_dx_沿x軸和_dy_沿y軸。這是相同的](qtransform.html)[QTransform](qtransform.html#QTransform)( ) ,翻譯( DX,DY ),但稍快。 此功能被引入Qt的4.5 。 ``` (QTransform, bool?invertible) QTransform.inverted (self) ``` 返回該矩陣的一個倒置的副本。 如果矩陣是奇異的(不可逆的) ,則返回的矩陣是單位矩陣。如果_invertible_是有效的(即不為0 ) ,將其值設置為True,如果矩陣是可逆的,否則設置為False 。 **See also** [isInvertible](qtransform.html#isInvertible)( ) 。 ``` bool QTransform.isAffine (self) ``` 返回True如果矩陣表示仿射變換,否則返回False 。 ``` bool QTransform.isIdentity (self) ``` 返回True如果矩陣為單位矩陣,否則返回False 。 **See also** [reset](qtransform.html#reset)( ) 。 ``` bool QTransform.isInvertible (self) ``` 返回True如果矩陣是可逆的,否則返回False 。 **See also** [inverted](qtransform.html#inverted)( ) 。 ``` bool QTransform.isRotating (self) ``` 返回True如果矩陣代表某種旋轉變換,否則返回False 。 **See also** [reset](qtransform.html#reset)( ) 。 ``` bool QTransform.isScaling (self) ``` 返回True如果矩陣表示縮放轉換,否則返回False 。 **See also** [reset](qtransform.html#reset)( ) 。 ``` bool QTransform.isTranslating (self) ``` 返回True如果矩陣表示平移變換,否則返回False 。 **See also** [reset](qtransform.html#reset)( ) 。 ``` float QTransform.m11 (self) ``` 返回水平縮放系數。 **See also** [scale](qtransform.html#scale)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` float QTransform.m12 (self) ``` 返回垂直剪切因素。 **See also** [shear](qtransform.html#shear)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` float QTransform.m13 (self) ``` 返回水平投影的因素。 **See also** [translate](qtransform.html#translate)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` float QTransform.m21 (self) ``` 返回水平剪切的因素。 **See also** [shear](qtransform.html#shear)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` float QTransform.m22 (self) ``` 返回垂直縮放系數。 **See also** [scale](qtransform.html#scale)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` float QTransform.m23 (self) ``` 返回垂直投影的因素。 **See also** [translate](qtransform.html#translate)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` float QTransform.m31 (self) ``` 返回水平平移因子。 **See also** [dx](qtransform.html#dx)( )[translate](qtransform.html#translate)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` float QTransform.m32 (self) ``` 返回垂直平移因子。 **See also** [dy](qtransform.html#dy)( )[translate](qtransform.html#translate)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` float QTransform.m33 (self) ``` 返回的分頻因子。 **See also** [translate](qtransform.html#translate)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` (int?tx, int?ty) QTransform.map (self, int?x, int?y) ``` 對應給定的坐標_x_和_y_成由該矩陣定義的坐標系。被放置在所得到的值*_tx_和*_ty_元。 則坐標值用下面的公式轉化: ``` x' = m11*x + m21*y + dx y' = m22*y + m12*x + dy if (is not affine) { w' = m13*x + m23*y + m33 x' /= w' y' /= w' } ``` 點(x ,y)是原始的點,和( X',Y ')是變換后的??點。 **See also** [Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` (float?tx, float?ty) QTransform.map (self, float?x, float?y) ``` 這是一個重載函數。 創建并返回一個[QPointF](qpointf.html)對象,它是給定的點的副本,_p_,映射到由該矩陣定義的坐標系。 ``` QPoint QTransform.map (self, QPoint?p) ``` [ 這是一個重載函數。 ](qpoint.html) [創建并返回一個](qpoint.html)[QPoint](qpoint.html)對象,它是給定一個副本_point_,映射到由該矩陣定義的坐標系。需要注意的是轉換后的坐標四舍五入到最接近的整數。 ``` QPointF QTransform.map (self, QPointF?p) ``` [ 這是一個重載函數。 ](qpointf.html) [創建并返回一個](qpointf.html)[QLineF](qlinef.html)對象,它是給定行的一個副本,_l_,映射到由該矩陣定義的坐標系。 ``` QLine QTransform.map (self, QLine?l) ``` [ 這是一個重載函數。 ](qline.html) [創建并返回一個](qline.html)[QLine](qline.html)對象,它是給定一個副本_line_,映射到由該矩陣定義的坐標系。需要注意的是轉換后的坐標四舍五入到最接近的整數。 ``` QLineF QTransform.map (self, QLineF?l) ``` [ 這是一個重載函數。 ](qlinef.html) [創建并返回一個](qlinef.html)[QPolygonF](qpolygonf.html)對象,它是給定一個副本_polygon_,映射到由該矩陣定義的坐標系。 ``` QPolygonF QTransform.map (self, QPolygonF?a) ``` [ 這是一個重載函數。 ](qpolygonf.html) [創建并返回一個](qpolygonf.html)[QPolygon](qpolygon.html)對象,它是給定一個副本_polygon_,映射到由該矩陣定義的坐標系。需要注意的是轉換后的坐標四舍五入到最接近的整數。 ``` QPolygon QTransform.map (self, QPolygon?a) ``` [ 這是一個重載函數。 ](qpolygon.html) [創建并返回一個](qpolygon.html)[QRegion](qregion.html)對象,它是給定一個副本_region_,映射到由該矩陣定義的坐標系。 調用此方法可以是相當昂貴的,如果旋轉或剪切的使用。 ``` QRegion QTransform.map (self, QRegion?r) ``` [ 這是一個重載函數。 ](qregion.html) [創建并返回一個](qregion.html)[QPainterPath](qpainterpath.html)對象,它是給定一個副本_path_,映射到由該矩陣定義的坐標系。 ``` QPainterPath QTransform.map (self, QPainterPath?p) ``` [ 這是一個重載函數。 對應給定的坐標_x_和_y_成由該矩陣定義的坐標系。被放置在所得到的值*_tx_和*_ty_元。需要注意的是轉換后的坐標四舍五入到最接近的整數。 ](qpainterpath.html) ``` QRect QTransform.mapRect (self, QRect) ``` [](qrect.html) [創建并返回一個](qrect.html)[QRectF](qrectf.html)對象,它是給定一個副本_rectangle_,映射到由該矩陣定義的坐標系。 矩形的坐標是用下面的公式轉化: ``` x' = m11*x + m21*y + dx y' = m22*y + m12*x + dy if (is not affine) { w' = m13*x + m23*y + m33 x' /= w' y' /= w' } ``` If rotation or shearing has been specified, this function returns the _bounding_ rectangle. To retrieve the exact region the given _rectangle_ maps to, use the [mapToPolygon](qtransform.html#mapToPolygon)() function instead. **See also** [mapToPolygon](qtransform.html#mapToPolygon)() and [Basic Matrix Operations](qtransform.html#basic-matrix-operations). ``` QRectF QTransform.mapRect (self, QRectF) ``` [](qrectf.html) ``` QPolygon QTransform.mapToPolygon (self, QRect?r) ``` [](qpolygon.html) [創建并返回一個](qpolygon.html)[QPolygon](qpolygon.html)給定的表示_rectangle_,映射到由該矩陣定義的坐標系。 矩形的坐標是用下面的公式轉化: ``` x' = m11*x + m21*y + dx y' = m22*y + m12*x + dy if (is not affine) { w' = m13*x + m23*y + m33 x' /= w' y' /= w' } ``` 多邊形和矩形的行為略有不同,當轉換(由于四舍五入的整數) ,所以`matrix.map(QPolygon(rectangle))`并不總是相同`matrix.mapToPolygon(rectangle)`。 **See also** [mapRect](qtransform.html#mapRect)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` bool QTransform.quadToQuad (QPolygonF?one, QPolygonF?two, QTransform?result) ``` 創建一個變換矩陣,_trans_,映射一個四邊形,_one_到另一個四邊多邊形,_two_。返回True如果轉換是可能的;否則返回False。 這是一個方便的方法相結合[quadToSquare](qtransform.html#quadToSquare)()和[squareToQuad](qtransform.html#squareToQuad)()方法。它允許輸入四要轉變成任何其他四。 **See also** [squareToQuad](qtransform.html#squareToQuad)()和[quadToSquare](qtransform.html#quadToSquare)( ) 。 ``` bool QTransform.quadToSquare (QPolygonF?quad, QTransform?result) ``` 創建一個變換矩陣,_trans_,映射一個四邊形,_quad_,到單位正方形。返回True如果變換構造還是假,如果這樣的轉變并不存在。 **See also** [squareToQuad](qtransform.html#squareToQuad)()和[quadToQuad](qtransform.html#quadToQuad)( ) 。 ``` QTransform.reset (self) ``` 重置矩陣單位矩陣,即所有元素都設置為零,除非`m11`和`m22`(指定刻度)和`m33`它被設置為1 。 **See also** [QTransform](qtransform.html#QTransform)( )[isIdentity](qtransform.html#isIdentity)()和[Basic Matrix Operations](qtransform.html#basic-matrix-operations)。 ``` QTransform QTransform.rotate (self, float?angle, Qt.Axis?axis?=?Qt.ZAxis) ``` [ 由給定的逆時針旋轉的坐標系_angle_關于指定_axis_并返回一個引用到矩陣。 ](qtransform.html) [請注意,如果你申請一個](qtransform.html)[QTransform](qtransform.html)在小窗口坐標定義的一個點,該旋轉方向將因為y軸指向下是順時針。 的角度被指定為度。 **See also** [setMatrix](qtransform.html#setMatrix)( ) 。 ``` QTransform QTransform.rotateRadians (self, float?angle, Qt.Axis?axis?=?Qt.ZAxis) ``` [ 由給定的逆時針旋轉的坐標系_angle_關于指定_axis_并返回一個引用到矩陣。 ](qtransform.html) [請注意,如果你申請一個](qtransform.html)[QTransform](qtransform.html)在小窗口坐標定義的一個點,該旋轉方向將因為y軸指向下是順時針。 的角度被指定為弧度。 **See also** [setMatrix](qtransform.html#setMatrix)( ) 。 ``` QTransform QTransform.scale (self, float?sx, float?sy) ``` [ 通過縮放坐標系_sx_水平和_sy_垂直,并返回一個引用到矩陣。 ](qtransform.html) [**See also**](qtransform.html) [setMatrix](qtransform.html#setMatrix)( ) 。 ``` QTransform.setMatrix (self, float?m11, float?m12, float?m13, float?m21, float?m22, float?m23, float?m31, float?m32, float?m33) ``` 設置矩陣的元素為指定的值,_m11_,_m12_,_m13_ _m21_,_m22_,_m23_ _m31_,_m32_和_m33_。請注意,此功能取代了以前的值。[QTransform](qtransform.html)提供[translate](qtransform.html#translate)( )[rotate](qtransform.html#rotate)( )[scale](qtransform.html#scale)()和[shear](qtransform.html#shear)( )方便的功能來操作基于當前定義的坐標系統中的各種矩陣元素。 **See also** [QTransform](qtransform.html#QTransform)( ) 。 ``` QTransform QTransform.shear (self, float?sh, float?sv) ``` [ 通過剪坐標系_sh_水平和_sv_垂直,并返回一個引用到矩陣。 ](qtransform.html) [**See also**](qtransform.html) [setMatrix](qtransform.html#setMatrix)( ) 。 ``` bool QTransform.squareToQuad (QPolygonF?square, QTransform?result) ``` 創建一個變換矩陣,_trans_,映射一個單位正方形四邊多邊形,_quad_。返回True如果變換構造還是假,如果這樣的轉變并不存在。 **See also** [quadToSquare](qtransform.html#quadToSquare)()和[quadToQuad](qtransform.html#quadToQuad)( ) 。 ``` QMatrix QTransform.toAffine (self) ``` [](qmatrix.html) [返回](qmatrix.html)[QTransform](qtransform.html)作為仿射矩陣。 **Warning:**如果已指定一個透視變換,那么轉換將導致數據丟失。 ``` QTransform QTransform.translate (self, float?dx, float?dy) ``` [ 移動的坐標系統_dx_沿x軸和_dy_沿著y軸,并返回引用到矩陣。 ](qtransform.html) [**See also**](qtransform.html) [setMatrix](qtransform.html#setMatrix)( ) 。 ``` QTransform QTransform.transposed (self) ``` [ 返回該矩陣的轉置。 ](qtransform.html) ``` TransformationType QTransform.type (self) ``` [ 返回這個矩陣的轉換類型。 改造型是最高的枚舉值捕獲所有矩陣的變換。例如,如果兩個矩陣規模和剪刀,類型是`TxShear`,因為`TxShear`具有比更高的枚舉值`TxScale`。 了解矩陣的變換類型是優化有用:你經常可以更優化處理特定類型的處理比一般情況下。 ](qtransform.html#TransformationType-enum) ``` QTransform QTransform.__add__ (self, float?n) ``` [](qtransform.html) ``` QTransform QTransform.__div__ (self, float?n) ``` [ ``` bool QTransform.__eq__ (self, QTransform) ``` ](qtransform.html) ``` QTransform QTransform.__iadd__ (self, float?num) ``` [](qtransform.html) ``` QTransform QTransform.__idiv__ (self, float?div) ``` [](qtransform.html) ``` QTransform QTransform.__imul__ (self, QTransform) ``` [](qtransform.html) ``` QTransform QTransform.__imul__ (self, float?num) ``` [](qtransform.html) ``` QTransform QTransform.__isub__ (self, float?num) ``` [](qtransform.html) ``` QTransform QTransform.__mul__ (self, QTransform?o) ``` [](qtransform.html) ``` QTransform QTransform.__mul__ (self, float?n) ``` [ ``` bool QTransform.__ne__ (self, QTransform) ``` ](qtransform.html) ``` QTransform QTransform.__sub__ (self, float?n) ``` [](qtransform.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>

                              哎呀哎呀视频在线观看