Obsolete Members for QPainterThe following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code. Public Functions
Member Function DocumentationQMatrix QPainter::combinedMatrix () constReturns the transformation matrix combining the current window/viewport and world transformation. It is advisable to use combinedTransform() instead of this function to preserve the properties of perspective transformations. This function was introduced in Qt 4.2. See also setWorldTransform(), setWindow(), and setViewport(). const QMatrix & QPainter::deviceMatrix () constReturns the matrix that transforms from logical coordinates to device coordinates of the platform dependent paint device. Note: It is advisable to use deviceTransform() instead of this function to preserve the properties of perspective transformations. This function is only needed when using platform painting commands on the platform dependent handle (Qt::HANDLE), and the platform does not do transformations nativly. The QPaintEngine::PaintEngineFeature enum can be queried to determine whether the platform performs the transformations or not. See also worldMatrix() and QPaintEngine::hasFeature(). void QPainter::drawRoundRect ( const QRectF & r, int xRnd = 25, int yRnd = 25 )Draws a rectangle r with rounded corners. The xRnd and yRnd arguments specify how rounded the corners should be. 0 is angled corners, 99 is maximum roundedness. A filled rectangle has a size of r.size(). A stroked rectangle has a size of r.size() plus the pen width. See also drawRoundedRect(). void QPainter::drawRoundRect ( const QRect & r, int xRnd = 25, int yRnd = 25 )This is an overloaded function. Draws the rectangle r with rounded corners. void QPainter::drawRoundRect ( int x, int y, int w, int h, int xRnd = 25, int yRnd = 25 )This is an overloaded function. Draws the rectangle x, y, w, h with rounded corners. const QMatrix & QPainter::matrix () constUse worldTransform() instead. See also setMatrix() and worldTransform(). bool QPainter::matrixEnabled () constUse worldMatrixEnabled() instead See also setMatrixEnabled() and worldMatrixEnabled(). void QPainter::resetMatrix ()Resets any transformations that were made using translate(), scale(), shear(), rotate(), setWorldMatrix(), setViewport() and setWindow(). It is advisable to use resetTransform() instead of this function to preserve the properties of perspective transformations. See also Coordinate Transformations. void QPainter::setMatrix ( const QMatrix & matrix, bool combine = false )Use setWorldTransform() instead. See also matrix() and setWorldTransform(). void QPainter::setMatrixEnabled ( bool enable )Use setWorldMatrixEnabled() instead. See also matrixEnabled() and setWorldMatrixEnabled(). void QPainter::setWorldMatrix ( const QMatrix & matrix, bool combine = false )Sets the transformation matrix to matrix and enables transformations. Note: It is advisable to use setWorldTransform() instead of this function to preserve the properties of perspective transformations. If combine is true, then matrix is combined with the current transformation matrix; otherwise matrix replaces the current transformation matrix. If matrix is the identity matrix and combine is false, this function calls setWorldMatrixEnabled(false). (The identity matrix is the matrix where QMatrix::m11() and QMatrix::m22() are 1.0 and the rest are 0.0.) The following functions can transform the coordinate system without using a QMatrix: They operate on the painter's worldMatrix() and are implemented like this: void QPainter::rotate(qreal angle) { QMatrix matrix; matrix.rotate(angle); setWorldMatrix(matrix, true); } Note that when using setWorldMatrix() function you should always have combine be true when you are drawing into a QPicture. Otherwise it may not be possible to replay the picture with additional transformations; using the translate(), scale(), etc. convenience functions is safe. For more information about the coordinate system, transformations and window-viewport conversion, see The Coordinate System documentation. This function was introduced in Qt 4.2. See also worldMatrix(), setWorldTransform(), and QTransform. const QMatrix & QPainter::worldMatrix () constReturns the world transformation matrix. It is advisable to use worldTransform() because worldMatrix() does not preserve the properties of perspective transformations. This function was introduced in Qt 4.2. See also setWorldMatrix(), Coordinate Transformations, and The Coordinate System.
|
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |