Qt 4.8
|
The QRectF class defines a rectangle in the plane using floating point precision. More...
#include <qrect.h>
Public Functions | |
void | adjust (qreal x1, qreal y1, qreal x2, qreal y2) |
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle. More... | |
QRectF | adjusted (qreal x1, qreal y1, qreal x2, qreal y2) const |
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of this rectangle. More... | |
qreal | bottom () const |
Returns the y-coordinate of the rectangle's bottom edge. More... | |
QPointF | bottomLeft () const |
Returns the position of the rectangle's bottom-left corner. More... | |
QPointF | bottomRight () const |
Returns the position of the rectangle's bottom-right corner. More... | |
QPointF | center () const |
Returns the center point of the rectangle. More... | |
bool | contains (const QPointF &p) const |
Returns true if the given point is inside or on the edge of the rectangle; otherwise returns false. More... | |
bool | contains (qreal x, qreal y) const |
Returns true if the point (x, y) is inside or on the edge of the rectangle; otherwise returns false. More... | |
bool | contains (const QRectF &r) const |
Returns true if the given rectangle is inside this rectangle; otherwise returns false. More... | |
void | getCoords (qreal *x1, qreal *y1, qreal *x2, qreal *y2) const |
Extracts the position of the rectangle's top-left corner to *x1 and *y1, and the position of the bottom-right corner to *x2 and y2. More... | |
void | getRect (qreal *x, qreal *y, qreal *w, qreal *h) const |
Extracts the position of the rectangle's top-left corner to *x and y, and its dimensions to *width and *height. More... | |
qreal | height () const |
Returns the height of the rectangle. More... | |
QRectF | intersect (const QRectF &r) const |
Use intersected(rectangle) instead. More... | |
QRectF | intersected (const QRectF &other) const |
Returns the intersection of this rectangle and the given rectangle. More... | |
bool | intersects (const QRectF &r) const |
Returns true if this rectangle intersects with the given rectangle (i. More... | |
bool | isEmpty () const |
Returns true if the rectangle is empty, otherwise returns false. More... | |
bool | isNull () const |
Returns true if the rectangle is a null rectangle, otherwise returns false. More... | |
bool | isValid () const |
Returns true if the rectangle is valid, otherwise returns false. More... | |
qreal | left () const |
Returns the x-coordinate of the rectangle's left edge. More... | |
void | moveBottom (qreal pos) |
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate. More... | |
void | moveBottomLeft (const QPointF &p) |
Moves the rectangle, leaving the bottom-left corner at the given position. More... | |
void | moveBottomRight (const QPointF &p) |
Moves the rectangle, leaving the bottom-right corner at the given position. More... | |
void | moveCenter (const QPointF &p) |
Moves the rectangle, leaving the center point at the given position. More... | |
void | moveLeft (qreal pos) |
Moves the rectangle horizontally, leaving the rectangle's left edge at the given x coordinate. More... | |
void | moveRight (qreal pos) |
Moves the rectangle horizontally, leaving the rectangle's right edge at the given x coordinate. More... | |
void | moveTo (qreal x, qreal t) |
Moves the rectangle, leaving the top-left corner at the given position (x, y). More... | |
void | moveTo (const QPointF &p) |
Moves the rectangle, leaving the top-left corner at the given position. More... | |
void | moveTop (qreal pos) |
Moves the rectangle vertically, leaving the rectangle's top line at the given y coordinate. More... | |
void | moveTopLeft (const QPointF &p) |
Moves the rectangle, leaving the top-left corner at the given position. More... | |
void | moveTopRight (const QPointF &p) |
Moves the rectangle, leaving the top-right corner at the given position. More... | |
QRectF | normalized () const |
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height. More... | |
QRectF | operator & (const QRectF &r) const |
Returns the intersection of this rectangle and the given rectangle. More... | |
QRectF & | operator &= (const QRectF &r) |
QRectF | operator| (const QRectF &r) const |
Returns the bounding rectangle of this rectangle and the given rectangle. More... | |
QRectF & | operator|= (const QRectF &r) |
Unites this rectangle with the given rectangle. More... | |
QRectF () | |
Constructs a null rectangle. More... | |
QRectF (const QPointF &topleft, const QSizeF &size) | |
Constructs a rectangle with the given topLeft corner and the given size. More... | |
QRectF (const QPointF &topleft, const QPointF &bottomRight) | |
Constructs a rectangle with the given topLeft and bottomRight corners. More... | |
QRectF (qreal left, qreal top, qreal width, qreal height) | |
Constructs a rectangle with (x, y) as its top-left corner and the given width and height. More... | |
QRectF (const QRect &rect) | |
Constructs a QRectF rectangle from the given QRect rectangle. More... | |
qreal | right () const |
Returns the x-coordinate of the rectangle's right edge. More... | |
void | setBottom (qreal pos) |
Sets the bottom edge of the rectangle to the given y coordinate. More... | |
void | setBottomLeft (const QPointF &p) |
Set the bottom-left corner of the rectangle to the given position. More... | |
void | setBottomRight (const QPointF &p) |
Set the bottom-right corner of the rectangle to the given position. More... | |
void | setCoords (qreal x1, qreal y1, qreal x2, qreal y2) |
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its bottom-right corner to (x2, y2). More... | |
void | setHeight (qreal h) |
Sets the height of the rectangle to the given height. More... | |
void | setLeft (qreal pos) |
Sets the left edge of the rectangle to the given x coordinate. More... | |
void | setRect (qreal x, qreal y, qreal w, qreal h) |
Sets the coordinates of the rectangle's top-left corner to (x, y), and its size to the given width and height. More... | |
void | setRight (qreal pos) |
Sets the right edge of the rectangle to the given x coordinate. More... | |
void | setSize (const QSizeF &s) |
Sets the size of the rectangle to the given size. More... | |
void | setTop (qreal pos) |
Sets the top edge of the rectangle to the given y coordinate. More... | |
void | setTopLeft (const QPointF &p) |
Set the top-left corner of the rectangle to the given position. More... | |
void | setTopRight (const QPointF &p) |
Set the top-right corner of the rectangle to the given position. More... | |
void | setWidth (qreal w) |
Sets the width of the rectangle to the given width. More... | |
void | setX (qreal pos) |
Sets the left edge of the rectangle to the given x coordinate. More... | |
void | setY (qreal pos) |
Sets the top edge of the rectangle to the given y coordinate. More... | |
QSizeF | size () const |
Returns the size of the rectangle. More... | |
QRect | toAlignedRect () const |
Returns a QRect based on the values of this rectangle that is the smallest possible integer rectangle that completely contains this rectangle. More... | |
qreal | top () const |
Returns the y-coordinate of the rectangle's top edge. More... | |
QPointF | topLeft () const |
Returns the position of the rectangle's top-left corner. More... | |
QPointF | topRight () const |
Returns the position of the rectangle's top-right corner. More... | |
QRect | toRect () const |
Returns a QRect based on the values of this rectangle. More... | |
void | translate (qreal dx, qreal dy) |
Moves the rectangle dx along the x-axis and dy along the y-axis, relative to the current position. More... | |
void | translate (const QPointF &p) |
Moves the rectangle {offset}. More... | |
QRectF | translated (qreal dx, qreal dy) const |
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis, relative to the current position. More... | |
QRectF | translated (const QPointF &p) const |
Returns a copy of the rectangle that is translated {offset}. More... | |
QRectF | unite (const QRectF &r) const |
Use united(rectangle) instead. More... | |
QRectF | united (const QRectF &other) const |
Returns the bounding rectangle of this rectangle and the given rectangle. More... | |
qreal | width () const |
Returns the width of the rectangle. More... | |
qreal | x () const |
Returns the x-coordinate of the rectangle's left edge. More... | |
qreal | y () const |
Returns the y-coordinate of the rectangle's top edge. More... | |
Properties | |
qreal | h |
qreal | w |
qreal | xp |
qreal | yp |
Friends | |
Q_CORE_EXPORT_INLINE bool | operator!= (const QRectF &, const QRectF &) |
Returns true if the rectangles r1 and r2 are different, otherwise returns false. More... | |
Q_CORE_EXPORT_INLINE bool | operator== (const QRectF &, const QRectF &) |
Returns true if the rectangles r1 and r2 are equal, otherwise returns false. More... | |
Related Functions | |
(Note that these are not member functions.) | |
QDataStream & | operator<< (QDataStream &stream, const QRectF &rectangle) |
Writes the rectangle to the stream, and returns a reference to the stream. More... | |
QDataStream & | operator>> (QDataStream &stream, QRectF &rectangle) |
Reads a rectangle from the stream, and returns a reference to the stream. More... | |
The QRectF class defines a rectangle in the plane using floating point precision.
A rectangle is normally expressed as an upper-left corner and a size. The size (width and height) of a QRectF is always equivalent to the mathematical rectangle that forms the basis for its rendering.
A QRectF can be constructed with a set of left, top, width and height integers, or from a QPoint and a QSize. The following code creates two identical rectangles.
There is also a third constructor creating a QRectF from a QRect, and a corresponding toRect() function that returns a QRect object based on the values of this rectangle (note that the coordinates in the returned rectangle are rounded to the nearest integer).
The QRectF class provides a collection of functions that return the various rectangle coordinates, and enable manipulation of these. QRectF also provide functions to move the rectangle relative to the various coordinates. In addition there is a moveTo() function that moves the rectangle, leaving its top left corner at the given coordinates. Alternatively, the translate() function moves the rectangle the given offset relative to the current position, and the translated() function returns a translated copy of this rectangle.
The size() function returns the rectange's dimensions as a QSize. The dimensions can also be retrieved separately using the width() and height() functions. To manipulate the dimensions use the setSize(), setWidth() or setHeight() functions. Alternatively, the size can be changed by applying either of the functions setting the rectangle coordinates, for example, setBottom() or setRight().
The contains() function tells whether a given point is inside the rectangle or not, and the intersects() function returns true if this rectangle intersects with a given rectangle (otherwise false). The QRectF class also provides the intersected() function which returns the intersection rectangle, and the united() function which returns the rectangle that encloses the given rectangle and this:
intersected() | united() |
The isEmpty() function returns true if the rectangle's width or height is less than, or equal to, 0. Note that an empty rectangle is not valid: The isValid() function returns true if both width and height is larger than 0. A null rectangle (isNull() == true) on the other hand, has both width and height set to 0.
Note that due to the way QRect and QRectF are defined, an empty QRectF is defined in essentially the same way as QRect.
Finally, QRectF objects can be streamed as well as compared.
When using an QPainter::Antialiasing{anti-aliased} painter, the boundary line of a QRectF will be rendered symmetrically on both sides of the mathematical rectangle's boundary line. But when using an aliased painter (the default) other rules apply.
Then, when rendering with a one pixel wide pen the QRectF's boundary line will be rendered to the right and below the mathematical rectangle's boundary line.
When rendering with a two pixels wide pen the boundary line will be split in the middle by the mathematical rectangle. This will be the case whenever the pen is set to an even number of pixels, while rendering with a pen with an odd number of pixels, the spare pixel will be rendered to the right and below the mathematical rectangle as in the one pixel case.
Logical representation | One pixel wide pen |
Two pixel wide pen | Three pixel wide pen |
The QRectF class provides a collection of functions that return the various rectangle coordinates, and enable manipulation of these. QRectF also provide functions to move the rectangle relative to the various coordinates.
For example: the bottom(), setBottom() and moveBottom() functions: bottom() returns the y-coordinate of the rectangle's bottom edge, setBottom() sets the bottom edge of the rectangle to the given y coordinate (it may change the height, but will never change the rectangle's top edge) and moveBottom() moves the entire rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate and its size unchanged.
It is also possible to add offsets to this rectangle's coordinates using the adjust() function, as well as retrieve a new rectangle based on adjustments of the original one using the adjusted() function. If either of the width and height is negative, use the normalized() function to retrieve a rectangle where the corners are swapped.
In addition, QRectF provides the getCoords() function which extracts the position of the rectangle's top-left and bottom-right corner, and the getRect() function which extracts the rectangle's top-left corner, width and height. Use the setCoords() and setRect() function to manipulate the rectangle's coordinates and dimensions in one go.
|
inline |
Constructs a null rectangle.
Definition at line 514 of file qrect.h.
Referenced by adjusted(), and translated().
Constructs a rectangle with the given topLeft corner and the given size.
Definition at line 634 of file qrect.h.
Constructs a rectangle with the given topLeft and bottomRight corners.
Definition at line 642 of file qrect.h.
|
inline |
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
Definition at line 778 of file qrect.h.
Referenced by _q_adjustRect(), QPlainTextDocumentLayout::blockBoundingRect(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QmlJSDebugger::BoundingRectHighlighter::highlightAll(), QTextControl::selectionRect(), QmlJSDebugger::SubcomponentMaskLayerItem::setCurrentItem(), QGraphicsLinearLayout::setGeometry(), and QGraphicsGridLayout::setGeometry().
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of this rectangle.
Definition at line 781 of file qrect.h.
Referenced by QPlainTextEditPrivate::_q_repaintContents(), QPixmapConvolutionFilter::boundingRectFor(), QPixmapBlurFilter::boundingRectFor(), QPixmapDropShadowFilter::boundingRectFor(), QGLLineMaskGenerator::computeScreenRect(), QGLRectMaskGenerator::computeScreenRect(), QGraphicsLayoutItem::contentsRect(), convolute(), QPainterPrivate::draw_helper(), QStyleHelper::drawDial(), QGraphicsScenePrivate::drawItemHelper(), QPlastiqueStyle::drawPrimitive(), QGraphicsItemEffectSourcePrivate::paddedEffectRect(), QWidgetEffectSourcePrivate::pixmap(), QGLPixmapBlurFilter::processGL(), qt_graphicsItem_highlightSelected(), QGLEllipseMaskGenerator::screenRect(), QGL2PaintEngineExPrivate::stroke(), QPaintBufferPrivate::updateBoundingRect(), QGraphicsWidget::windowFrameGeometry(), and QGraphicsWidget::windowFrameRect().
|
inline |
Returns the y-coordinate of the rectangle's bottom edge.
Definition at line 528 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QGL2PEXVertexArray::addQuad(), QGL2PEXVertexArray::addRect(), QmlJSDebugger::QDeclarativeViewInspector::adjustToScreenBoundaries(), QRenderRule::borderClip(), QGraphicsSceneBspTree::climbTree(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QOpenGLPaintEnginePrivate::copyDrawable(), QTextDocumentLayout::draw(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayoutPrivate::drawBorder(), QOpenGLPaintEnginePrivate::drawFastRect(), QTextDocumentLayoutPrivate::drawFlow(), QTextDocumentLayoutPrivate::drawFrame(), QRasterPaintEngine::drawImage(), QGL2PaintEngineEx::drawPixmap(), QGL2PaintEngineExPrivate::drawPixmapFragments(), QPaintEngineEx::drawRoundedRect(), QGL2PaintEngineEx::drawTexture(), drawTexture(), QOpenGLPaintEngine::drawTextureRect(), QOutlineMapper::endOutline(), QPlainTextEditPrivate::ensureVisible(), QGraphicsView::ensureVisible(), QGL2PaintEngineExPrivate::fill(), QBlitterPaintEngine::fillRect(), QIntersectionFinder::hasIntersections(), QPlainTextEditControl::hitTest(), QTextDocumentLayoutPrivate::hitTest(), QGraphicsSceneBspTree::initialize(), QPainterPath::intersects(), QTextDocumentLayoutPrivate::layoutBlock(), needsPerspectiveClipping(), QMatrix4x4::ortho(), QPlainTextEditPrivate::pageUpDown(), QPlainTextEdit::paintEvent(), QDashStroker::processCurrentSubpath(), QGLPixmapBlurFilter::processGL(), qMapGradientToRect(), qSubImage(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_painterpath_check_crossing(), qt_painterpath_isect_line_rect(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_transform_image(), QRasterizer::rasterize(), QGraphicsViewPrivate::recalculateContentSize(), QGL2PaintEngineExPrivate::resetClipIfNeeded(), QmlJSDebugger::resizeRect(), QVGPaintEnginePrivate::roundedRectPath(), QGLEllipseMaskGenerator::screenRect(), QPainter::setClipRect(), QTextBrowserPrivate::setSource(), toAlignedRect_positive(), toNormalizedFillRect(), QAlphaPaintEnginePrivate::toRect(), QTest::toString(), QPaintBufferPrivate::updateBoundingRect(), QSGGeometry::updateRectGeometry(), ShaderEffect::updateRenderTargets(), QSGGeometry::updateTexturedRectGeometry(), QPlainTextEditPrivate::verticalOffset(), QGraphicsWidget::windowFrameSectionAt(), and QPicturePaintEngine::writeCmdLength().
|
inline |
Returns the position of the rectangle's bottom-left corner.
Definition at line 542 of file qrect.h.
Referenced by QPainterPath::contains(), QRasterPaintEngine::drawImage(), QVGPaintEngine::drawRects(), QRasterPaintEngine::drawRects(), QRasterPaintEngine::drawTiledPixmap(), QRasterPaintEngine::fill(), QVGPaintEngine::fillRect(), QRasterPaintEngine::fillRect(), QGraphicsView::mapFromScene(), QMatrix4x4::mapRect(), and QGraphicsViewPrivate::mapToScene().
|
inline |
Returns the position of the rectangle's bottom-right corner.
Definition at line 540 of file qrect.h.
Referenced by QPlainTextDocumentLayout::blockBoundingRect(), QPainterPath::contains(), QRasterPaintEngine::drawImage(), QVGPaintEngine::drawRects(), QRasterPaintEngine::drawRects(), QRasterPaintEngine::drawTiledPixmap(), QRasterPaintEngine::fill(), QVGPaintEngine::fillRect(), QRasterPaintEngine::fillRect(), QIntersectionFinder::hasIntersections(), QOpenGLPaintEnginePrivate::isFastRect(), QGraphicsView::mapFromScene(), QMatrix4x4::mapRect(), QGraphicsViewPrivate::mapToScene(), qt_mapRect_non_normalizing(), and QGLEllipseMaskGenerator::screenRect().
|
inline |
Returns the center point of the rectangle.
Definition at line 686 of file qrect.h.
Referenced by QGraphicsView::centerOn(), QPainterPath::contains(), QStyleHelper::drawDial(), QGLEllipseMaskGenerator::drawMask(), QPainter::drawPie(), QPlainTextEditPrivate::ensureVisible(), QGraphicsView::fitInView(), QIntersectionFinder::hasIntersections(), QGraphicsSceneBspTree::initialize(), QPainterPath::intersects(), QTouchEvent::TouchPoint::pos(), qMapGradientToRect(), qt_find_ellipse_coords(), QTouchEvent::TouchPoint::scenePos(), QTouchEvent::TouchPoint::screenPos(), QGLEllipseMaskGenerator::screenRect(), QGraphicsView::setScene(), and QApplicationPrivate::updateTouchPointsForWidget().
bool QRectF::contains | ( | const QPointF & | point | ) | const |
Returns true if the given point is inside or on the edge of the rectangle; otherwise returns false.
Definition at line 2349 of file qrect.cpp.
Referenced by QPathClipper::clip(), QPathClipper::contains(), QPainterPath::contains(), contains(), QGraphicsTextItem::contains(), QPixmapConvolutionFilter::draw(), QGraphicsViewPrivate::findItems(), QDeclarativePathViewPrivate::handleMousePressEvent(), QGraphicsItemPrivate::initStyleOption(), QGraphicsSceneIndexRectIntersector::intersect(), QPathClipper::intersect(), QGraphicsSceneIndexPointIntersector::intersect(), QPainterPath::intersects(), QDeclarativeMouseArea::mouseMoveEvent(), QGraphicsItem::mousePressEvent(), QGraphicsTextItem::mouseReleaseEvent(), qt_format_text(), and QGraphicsWidget::windowFrameSectionAt().
Returns true if the point (x, y) is inside or on the edge of the rectangle; otherwise returns false.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 796 of file qrect.h.
bool QRectF::contains | ( | const QRectF & | rectangle | ) | const |
Extracts the position of the rectangle's top-left corner to *x1 and *y1, and the position of the bottom-right corner to *x2 and y2.
Definition at line 762 of file qrect.h.
Extracts the position of the rectangle's top-left corner to *x and y, and its dimensions to *width and *height.
Definition at line 746 of file qrect.h.
Referenced by _q_interpolate().
|
inline |
Returns the height of the rectangle.
Definition at line 710 of file qrect.h.
Referenced by _q_adjustRect(), QPlainTextEditPrivate::_q_adjustScrollbars(), _q_boundGeometryToSizeConstraints(), QPainterPath::addEllipse(), QGL2PEXVertexArray::addPath(), QPathSegments::addPath(), QPainterPath::addRect(), QPainterPath::addRoundedRect(), QPainterPath::addRoundRect(), QPainterPath::arcTo(), QPlainTextEditControl::blockBoundingRect(), QDeclarativeItemPrivate::computeTransformOrigin(), QPathClipper::contains(), QOpenGLPaintEnginePrivate::copyDrawable(), QPainter::PixmapFragment::create(), createRectNode(), QTriangulatingStroker::cubicTo(), QGraphicsSceneBspTree::debug(), QPlainTextDocumentLayout::documentChanged(), QTextLayout::draw(), QAlphaPaintEnginePrivate::drawAlphaImage(), QPainter::drawArc(), QTextDocumentLayoutPrivate::drawBlock(), QPainter::drawChord(), QCoreGraphicsPaintEngine::drawEllipse(), QVGPaintEngine::drawEllipse(), QRasterPaintEngine::drawEllipse(), QPainter::drawEllipse(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QPdfEngine::drawImage(), QCoreGraphicsPaintEngine::drawImage(), QX11PaintEngine::drawImage(), QVGPaintEngine::drawImage(), QSvgPaintEngine::drawImage(), QPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QPainter::drawImage(), QOpenGLPaintEnginePrivate::drawImageAsPath(), QPSPrintEngine::drawImageInternal(), drawImageTiled(), QGraphicsScenePrivate::drawItemHelper(), QGLEllipseMaskGenerator::drawMask(), QPainter::drawPath(), QPainter::drawPie(), QWin32PrintEngine::drawPixmap(), QPdfEngine::drawPixmap(), QCoreGraphicsPaintEngine::drawPixmap(), QX11PaintEngine::drawPixmap(), QPainter::drawPixmap(), QVGPaintEngine::drawPixmapFragments(), QVGPaintEngine::drawRects(), QPaintEngine::drawRects(), QPaintEngineEx::drawRects(), QRasterPaintEngine::drawRects(), QPdfBaseEngine::drawRects(), QPainter::drawRects(), QPaintEngineEx::drawRoundedRect(), QPainter::drawRoundedRect(), QTextDocumentLayoutPrivate::drawTableCell(), QPainter::drawText(), QPSPrintEngine::drawTiledPixmap(), QWin32PrintEngine::drawTiledPixmap(), QCoreGraphicsPaintEngine::drawTiledPixmap(), QX11PaintEngine::drawTiledPixmap(), QOpenGLPaintEngine::drawTiledPixmap(), QPaintEngine::drawTiledPixmap(), QRasterPaintEngine::drawTiledPixmap(), QPaintEngineEx::drawTiledPixmap(), QPainter::drawTiledPixmap(), drawVGImage(), QPdfEnginePrivate::embedFont(), QOutlineMapper::endOutline(), QPlainTextEditPrivate::ensureVisible(), QScriptEdit::extraAreaPaintEvent(), QEmulationPaintEngine::fill(), QRasterPaintEngine::fill(), QEmulationPaintEngine::fillBGRect(), QVGPaintEngine::fillRect(), QPaintEngineEx::fillRect(), QBlitterPaintEnginePrivate::fillRect(), QRasterPaintEngine::fillRect(), QGridLayoutEngine::fillRowData(), QGraphicsView::fitInView(), QDeclarativeCompiler::genLiteralAssignment(), QDeclarativePaintedItem::geometryChanged(), QDeclarativeItem::geometryChanged(), QDeclarativeFlickable::geometryChanged(), QGraphicsScene::height(), QPlainTextEditControl::hitTest(), QGraphicsSceneBspTree::initialize(), QPathClipper::intersect(), QDeclarativeLoaderPrivate::itemGeometryChanged(), QDeclarativeContents::itemGeometryChanged(), QDeclarativeAnchorsPrivate::itemGeometryChanged(), QDeclarativeGridViewPrivate::itemGeometryChanged(), QDeclarativeListViewPrivate::itemGeometryChanged(), QTextDocumentLayoutPrivate::layoutBlock(), QTextDocumentLayoutPrivate::layoutFlow(), QLabelPrivate::layoutRect(), QSvgIOHandlerPrivate::load(), QMacPixmapData::macCreatePixels(), QMatrix::mapRect(), QTransform::mapRect(), QMatrix4x4::mapRect(), QSvgTinyDocument::mapSourceToTarget(), QPaintBuffer::metric(), QmlJSDebugger::ZoomTool::mouseReleaseEvent(), operator<<(), QPlainTextEditPrivate::pageUpDown(), QFontFamilyDelegate::paint(), QDeclarativeParticlesPainter::paint(), QPlainTextEdit::paintEvent(), printPage(), QDashedStrokeProcessor::process(), QGLPixmapBlurFilter::processGL(), qDrawBorder(), QPolygonF::QPolygonF(), QRectF_intersects(), qt_curves_for_arc(), qt_find_ellipse_coords(), qt_format_text(), qt_graphicsItem_highlightSelected(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_mac_compose_rect(), qt_mac_create_imagemask(), qt_painterpath_isect_curve(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_scale_image_argb24_on_rgb16(), qt_scale_image_argb32_on_argb32(), qt_scale_image_argb32_on_rgb16(), qt_scale_image_rgb16_on_rgb16(), qt_scale_image_rgb32_on_rgb32(), QGraphicsViewPrivate::recalculateContentSize(), QGraphicsScene::render(), QGraphicsView::render(), QPaintEngineExPrivate::replayClipOperations(), QVGPaintEnginePrivate::roundedRectPath(), scaleRect(), QPainter::setClipPath(), QPainter::setClipRect(), QDeclarativeLayoutItem::setGeometry(), QX11WindowSurface::setGeometry(), setPenAndDrawBackground(), QTextBrowserPrivate::setSource(), QDeclarativeTextPrivate::setupTextLayout(), QDeclarativeRectFValueType::setY(), shift(), stretchGradientToUserSpace(), QEmulationPaintEngine::stroke(), toRect_normalized(), QTest::toString(), glyph_metrics_t::transformed(), ShaderEffectItem::updateEffectState(), ShaderEffectItem::updateGeometry(), and QPicturePaintEngine::writeCmdLength().
Use intersected(rectangle) instead.
Definition at line 813 of file qrect.h.
Referenced by intersected().
Returns the intersection of this rectangle and the given rectangle.
Note that {r.intersected(s)}
is equivalent to {r
& s}.
Definition at line 818 of file qrect.h.
Referenced by QTextEditPrivate::_q_repaintContents(), QPlainTextEditPrivate::_q_repaintContents(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QTextLayout::draw(), and QPainterPrivate::draw_helper().
bool QRectF::intersects | ( | const QRectF & | rectangle | ) | const |
Returns true if this rectangle intersects with the given rectangle (i.
e. there is a non-empty area of overlap between them), otherwise returns false.
The intersection rectangle can be retrieved using the intersected() function.
Definition at line 2744 of file qrect.cpp.
Referenced by QGraphicsTextItemPrivate::_q_update(), QPathClipper::clip(), QGraphicsItem::collidesWithPath(), QGraphicsSceneIndexRectIntersector::intersect(), QGraphicsSceneIndexPointIntersector::intersect(), QGraphicsItem::scroll(), QTextBrowserPrivate::setSource(), and QPainterPath::toFillPolygons().
|
inline |
Returns true if the rectangle is empty, otherwise returns false.
An empty rectangle has width() <= 0 or height() <= 0. An empty rectangle is not valid (i.e., isEmpty() == !isValid()).
Use the normalized() function to retrieve a rectangle where the corners are swapped.
Definition at line 658 of file qrect.h.
Referenced by QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QGraphicsItem::clipPath(), QPixmapConvolutionFilter::draw(), QPainterPrivate::draw_helper(), QRasterPaintEngine::drawEllipse(), QPdfEngine::drawImage(), QRasterPaintEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QPdfEngine::drawPixmap(), QRasterPaintEngine::drawRects(), drawTexture(), QPainter::drawTiledPixmap(), QRasterPaintEngine::fill(), QRasterPaintEngine::fillRect(), QGraphicsView::fitInView(), QGraphicsScenePrivate::markDirty(), QBlittablePixmapData::paintEngine(), QDashStroker::processCurrentSubpath(), QGraphicsScenePrivate::processDirtyItemsRecursive(), QPainter::setClipRect(), QSvgNode::transformedBounds(), QGraphicsScene::update(), QGraphicsItem::update(), QPaintBufferPrivate::updateBoundingRect(), QGraphicsViewPrivate::updateRectF(), QGraphicsViewPrivate::updateRegion(), and ShaderEffect::updateRenderTargets().
|
inline |
Returns true if the rectangle is a null rectangle, otherwise returns false.
A null rectangle has both the width and the height set to 0. A null rectangle is also empty, and hence not valid.
Definition at line 655 of file qrect.h.
Referenced by QPainterPath::addEllipse(), QPainterPath::addRect(), QPainterPath::addRoundedRect(), QPainterPath::addRoundRect(), QPainterPath::arcMoveTo(), QPainterPath::arcTo(), convolute(), QVGPixmapConvolutionFilter::draw(), QVGPixmapColorizeFilter::draw(), QGLPixmapFilter< QPixmapBlurFilter >::draw(), QVGPixmapDropShadowFilter::draw(), QVGPixmapBlurFilter::draw(), QPixmapConvolutionFilter::draw(), QPixmapBlurFilter::draw(), QPixmapColorizeFilter::draw(), QTextLayout::draw(), QGraphicsItem::ensureVisible(), QGraphicsSceneBspTreeIndexPrivate::estimateItems(), QGraphicsView::fitInView(), QSystemTrayIconPrivate::geometry_sys(), QGraphicsItem::isObscured(), QSvgTinyDocument::mapSourceToTarget(), QGraphicsScenePrivate::markDirty(), operator|(), qt_curves_for_arc(), qt_find_ellipse_coords(), QGraphicsScene::render(), QGraphicsView::render(), QGraphicsItem::scroll(), QGraphicsScene::setSceneRect(), QGraphicsView::setSceneRect(), QGraphicsScene::update(), and QGraphicsItem::update().
|
inline |
Returns true if the rectangle is valid, otherwise returns false.
A valid rectangle has a width() > 0 and height() > 0. Note that non-trivial operations like intersections are not defined for invalid rectangles. A valid rectangle is not empty (i.e., isValid() == !isEmpty()).
Definition at line 661 of file qrect.h.
Referenced by QTextEditPrivate::_q_repaintContents(), QPlainTextEditPrivate::_q_repaintContents(), QGraphicsTextItemPrivate::_q_update(), QTextLayoutStruct::addUpdateRectForFloat(), QTextControl::anchorPosition(), clipIfValid(), QTextDocumentLayout::documentChanged(), QTextControlPrivate::dragLeaveEvent(), QTextControlPrivate::dragMoveEvent(), QTextDocumentLayout::draw(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocument::drawContents(), QTextControl::drawContents(), QTextDocumentLayoutPrivate::drawFlow(), QTextDocumentLayoutPrivate::drawFrame(), QPlainTextEditPrivate::ensureVisible(), QTextDocumentLayoutPrivate::layoutBlock(), QTextDocumentLayoutPrivate::layoutFrame(), QTextControl::selectionRect(), and QDeclarativeTextEdit::updateImgCache().
|
inline |
Returns the x-coordinate of the rectangle's left edge.
Equivalent to x().
Definition at line 525 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QPrintPreviewWidgetPrivate::_q_fit(), QGL2PEXVertexArray::addQuad(), QGL2PEXVertexArray::addRect(), addSelectedRegionsToPath(), QmlJSDebugger::QDeclarativeViewInspector::adjustToScreenBoundaries(), QRenderRule::borderClip(), QGraphicsSceneBspTree::climbTree(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QOpenGLPaintEnginePrivate::copyDrawable(), QPlainTextEditControl::cursorRect(), QGraphicsSceneBspTree::debug(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayoutPrivate::drawBorder(), QOpenGLPaintEnginePrivate::drawFastRect(), QTextDocumentLayoutPrivate::drawFrame(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QRasterPaintEngine::drawImage(), QOpenGLPaintEnginePrivate::drawImageAsPath(), QTextDocumentLayoutPrivate::drawListItem(), QGL2PaintEngineEx::drawPixmap(), QGL2PaintEngineExPrivate::drawPixmapFragments(), QPaintEngineEx::drawRoundedRect(), QTextDocumentLayoutPrivate::drawTableCell(), QGL2PaintEngineEx::drawTexture(), drawTexture(), QOpenGLPaintEnginePrivate::drawTiledImageAsPath(), QWin32PrintEngine::drawTiledPixmap(), QOutlineMapper::endOutline(), QGraphicsView::ensureVisible(), QGL2PaintEngineExPrivate::fill(), QIntersectionFinder::hasIntersections(), QTextDocumentLayoutPrivate::hitTest(), QGraphicsSceneBspTree::initialize(), QPainterPath::intersects(), needsPerspectiveClipping(), QMatrix4x4::ortho(), QDeclarativeParticlesPainter::paint(), printPage(), QDashStroker::processCurrentSubpath(), QGLPixmapDropShadowFilter::processGL(), qDrawBorder(), QRectF_intersects(), qSubImage(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_painterpath_check_crossing(), qt_painterpath_isect_line_rect(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_transform_image(), QGraphicsViewPrivate::recalculateContentSize(), QGraphicsScene::render(), QGraphicsView::render(), QGL2PaintEngineExPrivate::resetClipIfNeeded(), QmlJSDebugger::resizeRect(), QVGPaintEnginePrivate::roundedRectPath(), QGLEllipseMaskGenerator::screenRect(), QTextControl::selectionRect(), QPainter::setClipRect(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), QDeclarativeTextPrivate::setupTextLayout(), QAlphaPaintEnginePrivate::toRect(), QTest::toString(), QPaintBufferPrivate::updateBoundingRect(), ShaderEffectItem::updateGeometry(), QSGGeometry::updateRectGeometry(), ShaderEffect::updateRenderTargets(), QSGGeometry::updateTexturedRectGeometry(), visualRect(), QGraphicsWidget::windowFrameSectionAt(), and QPicturePaintEngine::writeCmdLength().
|
inline |
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate.
The rectangle's size is unchanged.
Definition at line 695 of file qrect.h.
Referenced by moveBottomLeft(), and moveBottomRight().
|
inline |
Moves the rectangle, leaving the bottom-left corner at the given position.
The rectangle's size is unchanged.
Definition at line 701 of file qrect.h.
Referenced by QBlittablePixmapData::markRasterOverlay().
|
inline |
Moves the rectangle, leaving the bottom-right corner at the given position.
The rectangle's size is unchanged.
Definition at line 703 of file qrect.h.
|
inline |
Moves the rectangle, leaving the center point at the given position.
The rectangle's size is unchanged.
Definition at line 705 of file qrect.h.
Referenced by QApplication::notify(), QTouchEvent::TouchPoint::setPos(), QTouchEvent::TouchPoint::setScenePos(), QTouchEvent::TouchPoint::setScreenPos(), QApplicationPrivate::translateTouchEvent(), and QApplicationPrivate::updateTouchPointsForWidget().
|
inline |
Moves the rectangle horizontally, leaving the rectangle's left edge at the given x coordinate.
The rectangle's size is unchanged.
Definition at line 689 of file qrect.h.
Referenced by addSelectedRegionsToPath(), moveBottomLeft(), moveTopLeft(), and QDeclarativeRectFValueType::setX().
|
inline |
Moves the rectangle horizontally, leaving the rectangle's right edge at the given x coordinate.
The rectangle's size is unchanged.
Definition at line 693 of file qrect.h.
Referenced by moveBottomRight(), moveTopRight(), and visualRect().
Moves the rectangle, leaving the top-left corner at the given position (x, y).
The rectangle's size is unchanged.
Definition at line 728 of file qrect.h.
Referenced by convolute(), and QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget().
|
inline |
|
inline |
Moves the rectangle vertically, leaving the rectangle's top line at the given y coordinate.
The rectangle's size is unchanged.
Definition at line 691 of file qrect.h.
Referenced by QPrintPreviewWidgetPrivate::_q_fit(), addSelectedRegionsToPath(), moveTopLeft(), moveTopRight(), and QDeclarativeRectFValueType::setY().
|
inline |
Moves the rectangle, leaving the top-left corner at the given position.
The rectangle's size is unchanged.
Definition at line 697 of file qrect.h.
Referenced by QTextDocumentLayout::blockBoundingRect(), and QGraphicsWidget::setGeometry().
|
inline |
Moves the rectangle, leaving the top-right corner at the given position.
The rectangle's size is unchanged.
Definition at line 699 of file qrect.h.
QRectF QRectF::normalized | ( | ) | const |
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height.
If width() < 0 the function swaps the left and right corners, and it swaps the top and bottom corners if height() < 0.
Definition at line 1822 of file qrect.cpp.
Referenced by QPainterPath::addRoundedRect(), QPainterPath::addRoundRect(), QPainter::drawArc(), QPainter::drawChord(), QPainter::drawEllipse(), QRasterPaintEngine::drawImage(), QPainter::drawPie(), QRasterPaintEngine::drawRects(), QRasterPaintEngine::drawTiledPixmap(), QRasterPaintEngine::fill(), QRasterPaintEngine::fillRect(), QPainterPath::intersects(), QRasterPaintEnginePrivate::isUnclipped(), and QMacPixmapData::macCreatePixels().
Returns the intersection of this rectangle and the given rectangle.
Returns an empty rectangle if there is no intersection.
Referenced by operator|().
Referenced by operator|=().
Returns the bounding rectangle of this rectangle and the given rectangle.
Definition at line 2572 of file qrect.cpp.
Unites this rectangle with the given rectangle.
|
inline |
Returns the x-coordinate of the rectangle's right edge.
Definition at line 527 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QPrintPreviewWidgetPrivate::_q_fit(), QGL2PEXVertexArray::addQuad(), QGL2PEXVertexArray::addRect(), QmlJSDebugger::QDeclarativeViewInspector::adjustToScreenBoundaries(), QRenderRule::borderClip(), QDeclarativeTextInput::boundingRect(), QDeclarativeTextEdit::boundingRect(), QGraphicsSceneBspTree::climbTree(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QTextDocumentLayoutPrivate::drawBorder(), QOpenGLPaintEnginePrivate::drawFastRect(), QTextDocumentLayoutPrivate::drawFrame(), QRasterPaintEngine::drawImage(), QTextDocumentLayoutPrivate::drawListItem(), QGL2PaintEngineEx::drawPixmap(), QGL2PaintEngineExPrivate::drawPixmapFragments(), QPaintEngineEx::drawRoundedRect(), QGL2PaintEngineEx::drawTexture(), drawTexture(), QOpenGLPaintEngine::drawTextureRect(), QOutlineMapper::endOutline(), QGraphicsView::ensureVisible(), QGL2PaintEngineExPrivate::fill(), QBlitterPaintEngine::fillRect(), QIntersectionFinder::hasIntersections(), QTextDocumentLayoutPrivate::hitTest(), QGraphicsSceneBspTree::initialize(), QPainterPath::intersects(), needsPerspectiveClipping(), QMatrix4x4::ortho(), QDashStroker::processCurrentSubpath(), qSubImage(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_painterpath_check_crossing(), qt_painterpath_isect_line_rect(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_transform_image(), QGraphicsViewPrivate::recalculateContentSize(), QGL2PaintEngineExPrivate::resetClipIfNeeded(), QmlJSDebugger::resizeRect(), QVGPaintEnginePrivate::roundedRectPath(), QGLEllipseMaskGenerator::screenRect(), QTextControl::selectionRect(), QPainter::setClipRect(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), QDeclarativeTextPrivate::setupTextLayout(), toAlignedRect_positive(), toNormalizedFillRect(), QAlphaPaintEnginePrivate::toRect(), QTest::toString(), QPaintBufferPrivate::updateBoundingRect(), QSGGeometry::updateRectGeometry(), ShaderEffect::updateRenderTargets(), QSGGeometry::updateTexturedRectGeometry(), visualRect(), QGraphicsWidget::windowFrameSectionAt(), and QPicturePaintEngine::writeCmdLength().
|
inline |
Sets the bottom edge of the rectangle to the given y coordinate.
May change the height, but will never change the top edge of the rectangle.
Definition at line 676 of file qrect.h.
Referenced by QmlJSDebugger::QDeclarativeViewInspector::adjustToScreenBoundaries(), blitTexture(), QTextDocumentLayoutPrivate::drawBorder(), drawTexture(), QTextDocumentLayoutPrivate::layoutBlock(), QGraphicsSceneBspTree::rectForIndex(), QmlJSDebugger::resizeRect(), setBottomLeft(), setBottomRight(), and QGraphicsAnchorLayoutPrivate::setItemsGeometries().
|
inline |
Set the bottom-left corner of the rectangle to the given position.
May change the size, but will never change the top-right corner of the rectangle.
Definition at line 682 of file qrect.h.
|
inline |
Set the bottom-right corner of the rectangle to the given position.
May change the size, but will never change the top-left corner of the rectangle.
Definition at line 684 of file qrect.h.
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its bottom-right corner to (x2, y2).
Definition at line 770 of file qrect.h.
Referenced by QPathClipper::pathToRect(), and QPicturePaintEngine::writeCmdLength().
|
inline |
Sets the height of the rectangle to the given height.
The bottom edge is changed, but not the top one.
Definition at line 787 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QSvgText::draw(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QDeclarativeRectFValueType::setHeight(), QDeclarativeTextPrivate::setupTextLayout(), and QGraphicsWidget::windowFrameSectionAt().
|
inline |
Sets the left edge of the rectangle to the given x coordinate.
May change the width, but will never change the right edge of the rectangle.
Equivalent to setX().
Definition at line 670 of file qrect.h.
Referenced by QPrintPreviewWidgetPrivate::_q_fit(), QmlJSDebugger::QDeclarativeViewInspector::adjustToScreenBoundaries(), blitTexture(), QPlainTextEditControl::cursorRect(), drawTexture(), QGraphicsSceneBspTree::rectForIndex(), QmlJSDebugger::resizeRect(), QTextControl::selectionRect(), setBottomLeft(), QTextControl::setExtraSelections(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), and setTopLeft().
Sets the coordinates of the rectangle's top-left corner to (x, y), and its size to the given width and height.
Definition at line 754 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QGraphicsSceneBspTree::initialize(), operator>>(), QGraphicsScene::render(), QGraphicsView::render(), and QmlJSDebugger::ZoomTool::scaleView().
|
inline |
Sets the right edge of the rectangle to the given x coordinate.
May change the width, but will never change the left edge of the rectangle.
Definition at line 672 of file qrect.h.
Referenced by QPrintPreviewWidgetPrivate::_q_fit(), QTextControlPrivate::_q_updateBlock(), QmlJSDebugger::QDeclarativeViewInspector::adjustToScreenBoundaries(), blitTexture(), QDeclarativeTextInput::boundingRect(), QDeclarativeTextEdit::boundingRect(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawBlock(), drawTexture(), QGraphicsSceneBspTree::rectForIndex(), QmlJSDebugger::resizeRect(), QTextControl::selectionRect(), setBottomRight(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), and setTopRight().
|
inline |
Sets the size of the rectangle to the given size.
The top-left corner is not moved.
Definition at line 790 of file qrect.h.
Referenced by QGraphicsTextItemPrivate::_q_updateBoundingRect(), QGraphicsWidget::setGeometry(), QGraphicsTextItemPrivate::textControl(), QApplicationPrivate::translateTouchEvent(), QGraphicsSvgItemPrivate::updateDefaultSize(), and QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget().
|
inline |
Sets the top edge of the rectangle to the given y coordinate.
May change the height, but will never change the bottom edge of the rectangle.
Equivalent to setY().
Definition at line 674 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QmlJSDebugger::QDeclarativeViewInspector::adjustToScreenBoundaries(), blitTexture(), QTextDocumentLayoutPrivate::drawBorder(), drawTexture(), QTextDocumentLayoutPrivate::layoutBlock(), QGraphicsSceneBspTree::rectForIndex(), QmlJSDebugger::resizeRect(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), setTopLeft(), and setTopRight().
|
inline |
Set the top-left corner of the rectangle to the given position.
May change the size, but will never change the bottom-right corner of the rectangle.
Definition at line 678 of file qrect.h.
|
inline |
Set the top-right corner of the rectangle to the given position.
May change the size, but will never change the bottom-left corner of the rectangle.
Definition at line 680 of file qrect.h.
|
inline |
Sets the width of the rectangle to the given width.
The right edge is changed, but not the left one.
Definition at line 784 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QPlainTextDocumentLayout::blockBoundingRect(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QPlainTextEdit::paintEvent(), QTextControl::setExtraSelections(), and QDeclarativeRectFValueType::setWidth().
|
inline |
Sets the left edge of the rectangle to the given x coordinate.
May change the width, but will never change the right edge of the rectangle.
Equivalent to setLeft().
Definition at line 536 of file qrect.h.
|
inline |
Sets the top edge of the rectangle to the given y coordinate.
May change the height, but will never change the bottom edge of the rectangle.
Equivalent to setTop().
Definition at line 537 of file qrect.h.
|
inline |
Returns the size of the rectangle.
Definition at line 713 of file qrect.h.
Referenced by QGraphicsTextItemPrivate::_q_updateBoundingRect(), CapabilitiesToStateMask::canBlitterDrawPixmap(), QGridLayoutEngine::cellRect(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QVGPixmapConvolutionFilter::draw(), QVGPixmapColorizeFilter::draw(), QVGPixmapDropShadowFilter::draw(), QVGPixmapBlurFilter::draw(), QDirectFBPaintEngine::drawImage(), QX11PaintEngine::drawImage(), QVGPaintEngine::drawImage(), QDirectFBPaintEngine::drawPixmap(), QWin32PrintEngine::drawPixmap(), QRasterPaintEngine::drawPixmap(), QVGPaintEngine::drawPixmapFragments(), drawTexture(), QPainter::drawTiledPixmap(), drawVGImage(), QBlitterPaintEngine::fillRect(), ShaderEffectItem::geometryChanged(), QDeclarativePathViewPrivate::itemGeometryChanged(), QDeclarativeBasePositionerPrivate::itemGeometryChanged(), QSvgTinyDocument::mapSourceToTarget(), QPainterPath::operator==(), QGraphicsItemEffectSourcePrivate::paddedEffectRect(), QStaticTextPrivate::paintText(), QGridLayoutEngine::setGeometries(), QGraphicsLayoutItem::setGeometry(), QGraphicsWidget::setGeometry(), QFontMetricsF::size(), QGraphicsSvgItemPrivate::updateDefaultSize(), QGraphicsWidgetPrivate::windowFrameMouseMoveEvent(), and QGraphicsWidget::~QGraphicsWidget().
QRect QRectF::toAlignedRect | ( | ) | const |
Returns a QRect based on the values of this rectangle that is the smallest possible integer rectangle that completely contains this rectangle.
Definition at line 2817 of file qrect.cpp.
Referenced by QTextEditPrivate::_q_repaintContents(), QPlainTextEditPrivate::_q_repaintContents(), QFontMetrics::boundingRect(), QGLPathMaskGenerator::computeScreenRect(), QGLLineMaskGenerator::computeScreenRect(), QGLRectMaskGenerator::computeScreenRect(), convolute(), QPixmapBlurFilter::draw(), QPixmapColorizeFilter::draw(), QPainterPrivate::draw_helper(), QX11PaintEngine::drawEllipse(), QRasterPaintEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QRasterPaintEngine::drawPixmap(), QX11PaintEngine::drawRects(), QGraphicsItemPrivate::effectiveBoundingRect(), QRasterPaintEnginePrivate::isUnclipped(), QGraphicsViewPrivate::mapToViewRect(), QGraphicsItemEffectSourcePrivate::paddedEffectRect(), QWidgetEffectSourcePrivate::pixmap(), QGLPixmapDropShadowFilter::processGL(), QX11PixmapData::transformed(), QImage::transformed(), QGraphicsViewPrivate::updateRectF(), and QGraphicsViewPrivate::updateRegion().
|
inline |
Returns the y-coordinate of the rectangle's top edge.
Equivalent to y().
Definition at line 526 of file qrect.h.
Referenced by QPlainTextEditPrivate::_q_adjustScrollbars(), _q_boundGeometryToSizeConstraints(), QPrintPreviewWidgetPrivate::_q_fit(), QGL2PEXVertexArray::addQuad(), QGL2PEXVertexArray::addRect(), addSelectedRegionsToPath(), QmlJSDebugger::QDeclarativeViewInspector::adjustToScreenBoundaries(), QTextControl::anchorPosition(), QRenderRule::borderClip(), QGraphicsSceneBspTree::climbTree(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QGraphicsSceneBspTree::debug(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayoutPrivate::drawBorder(), QOpenGLPaintEnginePrivate::drawFastRect(), QTextDocumentLayoutPrivate::drawFrame(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QRasterPaintEngine::drawImage(), QOpenGLPaintEnginePrivate::drawImageAsPath(), QGL2PaintEngineEx::drawPixmap(), QGL2PaintEngineExPrivate::drawPixmapFragments(), QPaintEngineEx::drawRoundedRect(), QTextDocumentLayoutPrivate::drawTableCell(), QGL2PaintEngineEx::drawTexture(), drawTexture(), QOpenGLPaintEnginePrivate::drawTiledImageAsPath(), QWin32PrintEngine::drawTiledPixmap(), QOutlineMapper::endOutline(), QPlainTextEditPrivate::ensureVisible(), QGraphicsView::ensureVisible(), QScriptEdit::extraAreaPaintEvent(), QGL2PaintEngineExPrivate::fill(), QIntersectionFinder::hasIntersections(), QPlainTextEditControl::hitTest(), QTextDocumentLayoutPrivate::hitTest(), QGraphicsSceneBspTree::initialize(), QPainterPath::intersects(), QTextDocumentLayoutPrivate::layoutBlock(), needsPerspectiveClipping(), QMatrix4x4::ortho(), QTextEditPrivate::pageUpDown(), QPlainTextEditPrivate::pageUpDown(), QDeclarativeParticlesPainter::paint(), QPlainTextEdit::paintEvent(), printPage(), QDashStroker::processCurrentSubpath(), QGLPixmapDropShadowFilter::processGL(), qMapGradientToRect(), QRectF_intersects(), qSubImage(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_painterpath_check_crossing(), qt_painterpath_isect_line_rect(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_transform_image(), QRasterizer::rasterize(), QGraphicsViewPrivate::recalculateContentSize(), QGraphicsScene::render(), QGraphicsView::render(), QGL2PaintEngineExPrivate::resetClipIfNeeded(), QmlJSDebugger::resizeRect(), QVGPaintEnginePrivate::roundedRectPath(), QGLEllipseMaskGenerator::screenRect(), QPainter::setClipRect(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), QTextBrowserPrivate::setSource(), QAlphaPaintEnginePrivate::toRect(), QTest::toString(), QPaintBufferPrivate::updateBoundingRect(), ShaderEffectItem::updateGeometry(), QSGGeometry::updateRectGeometry(), ShaderEffect::updateRenderTargets(), QSGGeometry::updateTexturedRectGeometry(), QGraphicsWidget::windowFrameSectionAt(), and QPicturePaintEngine::writeCmdLength().
|
inline |
Returns the position of the rectangle's top-left corner.
Definition at line 539 of file qrect.h.
Referenced by QPainterPath::contains(), QVGPixmapConvolutionFilter::draw(), QVGPixmapColorizeFilter::draw(), QVGPixmapDropShadowFilter::draw(), QVGPixmapBlurFilter::draw(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QVGPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QTextDocumentLayoutPrivate::drawListItem(), QWin32PrintEngine::drawPixmap(), QRasterPaintEngine::drawPixmap(), QVGPaintEngine::drawPixmapFragments(), QVGPaintEngine::drawRects(), QRasterPaintEngine::drawRects(), QTextDocumentLayoutPrivate::drawTableCell(), QRasterPaintEngine::drawTiledPixmap(), QPainter::drawTiledPixmap(), drawVGImage(), QPlainTextEditPrivate::ensureVisible(), QRasterPaintEngine::fill(), fillBackground(), QDirectFBPaintEngine::fillRect(), QVGPaintEngine::fillRect(), QRasterPaintEngine::fillRect(), QIntersectionFinder::hasIntersections(), QTextDocumentLayoutPrivate::hitTest(), QOpenGLPaintEnginePrivate::isFastRect(), QGraphicsSceneIndexPrivate::itemCollidesWithPath(), QGraphicsView::mapFromScene(), QMatrix4x4::mapRect(), QGraphicsViewPrivate::mapToScene(), QLabel::paintEvent(), QGraphicsWidget::paintWindowFrame(), QGraphicsItemEffectSourcePrivate::pixmap(), qt_mapRect_non_normalizing(), QGLEllipseMaskGenerator::screenRect(), QGraphicsLayoutItem::setGeometry(), QGraphicsWidget::setGeometry(), QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget(), and QGraphicsWidgetPrivate::windowFrameMouseMoveEvent().
|
inline |
Returns the position of the rectangle's top-right corner.
Definition at line 541 of file qrect.h.
Referenced by QPainterPath::contains(), QRasterPaintEngine::drawImage(), QVGPaintEngine::drawRects(), QRasterPaintEngine::drawRects(), QRasterPaintEngine::drawTiledPixmap(), QRasterPaintEngine::fill(), QVGPaintEngine::fillRect(), QRasterPaintEngine::fillRect(), QGraphicsView::mapFromScene(), QMatrix4x4::mapRect(), and QGraphicsViewPrivate::mapToScene().
|
inline |
Returns a QRect based on the values of this rectangle.
Note that the coordinates in the returned rectangle are rounded to the nearest integer.
Definition at line 845 of file qrect.h.
Referenced by QTextEditPrivate::_q_ensureVisible(), QDirectFbBlitter::alphaFillRect(), QDirectFBPaintEnginePrivate::blit(), QVGPaintEngine::clip(), QOpenGLPaintEngine::clip(), QPainter::clipRegion(), clipTransformIsSimple(), QVGPixmapConvolutionFilter::draw(), QVGPixmapColorizeFilter::draw(), QVGPixmapDropShadowFilter::draw(), QVGPixmapBlurFilter::draw(), QPixmapConvolutionFilter::draw(), QTextDocumentLayoutPrivate::drawBorder(), QPSPrintEngine::drawImage(), QPdfEngine::drawImage(), QVGPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QPSPrintEngine::drawPixmap(), QWin32PrintEngine::drawPixmap(), QPdfEngine::drawPixmap(), QVGPaintEngine::drawPixmapFragments(), QDirectFbBlitter::drawPixmapOpacity(), QDirectFBPaintEnginePrivate::drawTiledPixmap(), QRasterPaintEngine::drawTiledPixmap(), drawVGImage(), QBlitterPaintEnginePrivate::fillRect(), QSystemTrayIconPrivate::geometry_sys(), QGraphicsWidget::initStyleOption(), QGraphicsItemPrivate::initStyleOption(), QPlainTextEdit::inputMethodQuery(), QTextEdit::inputMethodQuery(), QDeclarativePaintedItem::paint(), QDeclarativeText::paint(), QLabel::paintEvent(), QAccessibleTextEdit::rect(), QAccessibleDial::rect(), QGraphicsScene::render(), QGraphicsView::render(), QWidgetPrivate::screenGeometry(), QPainter::setClipRect(), QmlJSDebugger::SubcomponentMaskLayerItem::setCurrentItem(), QXRenderTessellator::tessellate(), and QDeclarativeTextEdit::updateImgCache().
Moves the rectangle dx along the x-axis and dy along the y-axis, relative to the current position.
Positive values move the rectangle to the right and downwards.
Definition at line 716 of file qrect.h.
Referenced by QGraphicsTextItemPrivate::_q_ensureVisible(), QGraphicsTextItemPrivate::_q_update(), QPlainTextEditControl::blockBoundingRect(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayoutPrivate::drawFrame(), QRasterPaintEngine::drawImage(), QTextDocumentLayoutPrivate::drawListItem(), QRasterPaintEngine::drawTiledPixmap(), QTextDocumentLayoutPrivate::hitTest(), QTextDocumentLayoutPrivate::layoutFlow(), QGraphicsViewPrivate::mapToViewRect(), QPlainTextEditPrivate::pageUpDown(), QGraphicsTextItem::paint(), QGraphicsItem::sceneBoundingRect(), QGraphicsItemPrivate::sceneEffectiveBoundingRect(), QGraphicsItem::scroll(), QTextControl::selectionRect(), QGraphicsViewPrivate::setUpdateClip(), and updateHelper().
|
inline |
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis, relative to the current position.
Positive values move the rectangle to the right and down.
Definition at line 740 of file qrect.h.
Referenced by QDeclarativeTextEdit::boundingRect(), QPixmapDropShadowFilter::boundingRectFor(), QPixmapConvolutionFilter::draw(), QPixmapBlurFilter::draw(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawListItem(), QRasterPaintEngine::drawPixmap(), QGraphicsScenePrivate::drawSubtreeRecursive(), QPlainTextEditPrivate::ensureVisible(), QScriptEdit::extraAreaPaintEvent(), QRasterPaintEngine::fillRect(), QGraphicsTextItem::inputMethodQuery(), QGraphicsProxyWidgetPrivate::inputMethodQueryHelper(), QGraphicsSceneIndexRectIntersector::intersect(), QGraphicsSceneIndexPointIntersector::intersect(), QGraphicsSceneIndexPathIntersector::intersect(), QGraphicsItem::mapFromParent(), QGraphicsItem::mapFromScene(), QTransform::mapRect(), QMatrix4x4::mapRect(), QGraphicsItem::mapRectFromParent(), QGraphicsItem::mapRectFromScene(), QGraphicsItem::mapRectToParent(), QGraphicsItem::mapRectToScene(), QGraphicsItem::mapToParent(), QGraphicsItem::mapToScene(), QGraphicsViewPrivate::mapToViewRect(), QLabel::paintEvent(), QPlainTextEdit::paintEvent(), QGraphicsScenePrivate::processDirtyItemsRecursive(), QGLPixmapBlurFilter::processGL(), qSubImage(), and QGraphicsWidgetPrivate::windowFrameHoverMoveEvent().
Returns a copy of the rectangle that is translated {offset}.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
x() along the x axis and {offset}.y() along the y axis, relative to the current position.
Definition at line 743 of file qrect.h.
Returns the bounding rectangle of this rectangle and the given rectangle.
Definition at line 828 of file qrect.h.
Referenced by QPixmapDropShadowFilter::boundingRectFor(), QTextBrowserPrivate::setSource(), and QDeclarativeTextPrivate::setupTextLayout().
|
inline |
Returns the width of the rectangle.
Definition at line 707 of file qrect.h.
Referenced by _q_adjustRect(), _q_boundGeometryToSizeConstraints(), QPrintPreviewWidgetPrivate::_q_fit(), QPainterPath::addEllipse(), QGL2PEXVertexArray::addPath(), QPathSegments::addPath(), QPainterPath::addRect(), QPainterPath::addRoundedRect(), QPainterPath::addRoundRect(), QPainterPath::arcTo(), QPlainTextDocumentLayout::blockBoundingRect(), QDeclarativeItemPrivate::computeTransformOrigin(), QPathClipper::contains(), QOpenGLPaintEnginePrivate::copyDrawable(), QPainter::PixmapFragment::create(), createRectNode(), QTriangulatingStroker::cubicTo(), QGraphicsSceneBspTree::debug(), QAlphaPaintEnginePrivate::drawAlphaImage(), QPainter::drawArc(), QTextDocumentLayoutPrivate::drawBlock(), QPainter::drawChord(), QStyleHelper::drawDial(), QCoreGraphicsPaintEngine::drawEllipse(), QVGPaintEngine::drawEllipse(), QRasterPaintEngine::drawEllipse(), QPainter::drawEllipse(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QPdfEngine::drawImage(), QCoreGraphicsPaintEngine::drawImage(), QX11PaintEngine::drawImage(), QVGPaintEngine::drawImage(), QSvgPaintEngine::drawImage(), QPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QPainter::drawImage(), QOpenGLPaintEnginePrivate::drawImageAsPath(), QPSPrintEngine::drawImageInternal(), drawImageTiled(), QGraphicsScenePrivate::drawItemHelper(), QTextDocumentLayoutPrivate::drawListItem(), QGLEllipseMaskGenerator::drawMask(), QPainter::drawPath(), QPainter::drawPie(), QWin32PrintEngine::drawPixmap(), QPdfEngine::drawPixmap(), QCoreGraphicsPaintEngine::drawPixmap(), QX11PaintEngine::drawPixmap(), QPainter::drawPixmap(), QVGPaintEngine::drawPixmapFragments(), QVGPaintEngine::drawRects(), QPaintEngine::drawRects(), QPaintEngineEx::drawRects(), QRasterPaintEngine::drawRects(), QPdfBaseEngine::drawRects(), QPainter::drawRects(), QPaintEngineEx::drawRoundedRect(), QPainter::drawRoundedRect(), QTextDocumentLayoutPrivate::drawTableCell(), QPainter::drawText(), QOpenGLPaintEngine::drawTextureRect(), QPSPrintEngine::drawTiledPixmap(), QWin32PrintEngine::drawTiledPixmap(), QCoreGraphicsPaintEngine::drawTiledPixmap(), QX11PaintEngine::drawTiledPixmap(), QOpenGLPaintEngine::drawTiledPixmap(), QPaintEngine::drawTiledPixmap(), QRasterPaintEngine::drawTiledPixmap(), QPaintEngineEx::drawTiledPixmap(), QPainter::drawTiledPixmap(), drawVGImage(), QPdfEnginePrivate::embedFont(), QOutlineMapper::endOutline(), QEmulationPaintEngine::fill(), QRasterPaintEngine::fill(), QEmulationPaintEngine::fillBGRect(), QVGPaintEngine::fillRect(), QPaintEngineEx::fillRect(), QBlitterPaintEnginePrivate::fillRect(), QRasterPaintEngine::fillRect(), QGridLayoutEngine::fillRowData(), QGraphicsView::fitInView(), QDeclarativeCompiler::genLiteralAssignment(), QDeclarativePaintedItem::geometryChanged(), QDeclarativeItem::geometryChanged(), QDeclarativeText::geometryChanged(), QDeclarativeFlickable::geometryChanged(), QDeclarativeTextInput::geometryChanged(), QDeclarativeListView::geometryChanged(), QDeclarativeTextEdit::geometryChanged(), QGraphicsSceneBspTree::initialize(), QPathClipper::intersect(), QDeclarativeLoaderPrivate::itemGeometryChanged(), QDeclarativeContents::itemGeometryChanged(), QDeclarativeAnchorsPrivate::itemGeometryChanged(), QDeclarativeGridViewPrivate::itemGeometryChanged(), QDeclarativeListViewPrivate::itemGeometryChanged(), QLabelPrivate::layoutRect(), QSvgIOHandlerPrivate::load(), QMacPixmapData::macCreatePixels(), QMatrix::mapRect(), QTransform::mapRect(), QMatrix4x4::mapRect(), QSvgTinyDocument::mapSourceToTarget(), QPaintBuffer::metric(), QmlJSDebugger::ZoomTool::mouseReleaseEvent(), operator<<(), QDeclarativeParticlesPainter::paint(), QPlainTextEdit::paintEvent(), printPage(), QDashedStrokeProcessor::process(), QGLPixmapBlurFilter::processGL(), qDrawBorder(), QPolygonF::QPolygonF(), QRectF_intersects(), qt_curves_for_arc(), qt_find_ellipse_coords(), qt_format_text(), qt_graphicsItem_highlightSelected(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_mac_compose_rect(), qt_mac_create_imagemask(), qt_painterpath_isect_curve(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_scale_image_argb24_on_rgb16(), qt_scale_image_argb32_on_argb32(), qt_scale_image_argb32_on_rgb16(), qt_scale_image_rgb16_on_rgb16(), qt_scale_image_rgb32_on_rgb32(), QGraphicsViewPrivate::recalculateContentSize(), QGraphicsScene::render(), QGraphicsView::render(), QPaintEngineExPrivate::replayClipOperations(), QVGPaintEnginePrivate::roundedRectPath(), scaleRect(), QPainter::setClipPath(), QPainter::setClipRect(), QDeclarativeLayoutItem::setGeometry(), QX11WindowSurface::setGeometry(), setPenAndDrawBackground(), QDeclarativeTextPrivate::setupTextLayout(), QDeclarativeRectFValueType::setY(), shift(), stretchGradientToUserSpace(), QEmulationPaintEngine::stroke(), toRect_normalized(), QTest::toString(), glyph_metrics_t::transformed(), ShaderEffectItem::updateEffectState(), ShaderEffectItem::updateGeometry(), QGraphicsScene::width(), and QPicturePaintEngine::writeCmdLength().
|
inline |
Returns the x-coordinate of the rectangle's left edge.
Equivalent to left().
Definition at line 664 of file qrect.h.
Referenced by QPainterPath::addEllipse(), QPainterPath::addRect(), QPainterPath::addRoundedRect(), QPainterPath::addRoundRect(), QPainterPath::arcTo(), QRenderRule::borderClip(), QPainter::boundingRect(), QGridLayoutEngine::cellRect(), QPathClipper::contains(), QPainter::PixmapFragment::create(), QAlphaPaintEnginePrivate::drawAlphaImage(), QPainter::drawArc(), QPainter::drawChord(), QCoreGraphicsPaintEngine::drawEllipse(), QVGPaintEngine::drawEllipse(), QRasterPaintEngine::drawEllipse(), QPainter::drawEllipse(), QPdfEngine::drawImage(), QCoreGraphicsPaintEngine::drawImage(), QX11PaintEngine::drawImage(), QVGPaintEngine::drawImage(), QSvgPaintEngine::drawImage(), QPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QPainter::drawImage(), QPSPrintEngine::drawImageInternal(), drawImageTiled(), QPainter::drawPath(), QPainter::drawPie(), QPdfEngine::drawPixmap(), QCoreGraphicsPaintEngine::drawPixmap(), QX11PaintEngine::drawPixmap(), QPainter::drawPixmap(), QVGPaintEngine::drawRects(), QPaintEngine::drawRects(), QPaintEngineEx::drawRects(), QPdfBaseEngine::drawRects(), QPainter::drawRoundedRect(), QPainter::drawText(), drawTexture(), QOpenGLPaintEngine::drawTextureRect(), QPSPrintEngine::drawTiledPixmap(), QCoreGraphicsPaintEngine::drawTiledPixmap(), QX11PaintEngine::drawTiledPixmap(), QVGPaintEngine::drawTiledPixmap(), QPaintEngine::drawTiledPixmap(), QRasterPaintEngine::drawTiledPixmap(), QPaintEngineEx::drawTiledPixmap(), QPainter::drawTiledPixmap(), drawVGImage(), QPdfEnginePrivate::embedFont(), QOutlineMapper::endOutline(), QEmulationPaintEngine::fill(), QEmulationPaintEngine::fillBGRect(), QBlitterPaintEngine::fillRect(), QVGPaintEngine::fillRect(), QPaintEngineEx::fillRect(), QBlitterPaintEnginePrivate::fillRect(), QGridLayoutEngine::fillRowData(), QDeclarativeCompiler::genLiteralAssignment(), QDeclarativeMouseArea::geometryChanged(), QPathClipper::intersect(), QDeclarativeContents::itemGeometryChanged(), QDeclarativeAnchorsPrivate::itemGeometryChanged(), QDeclarativeFlickablePrivate::itemGeometryChanged(), QLabelPrivate::layoutRect(), QMatrix::mapRect(), QTransform::mapRect(), QMatrix4x4::mapRect(), QSvgTinyDocument::mapSourceToTarget(), QDeclarativeTextEdit::moveCursorDelegate(), operator<<(), QDeclarativeText::paint(), QLabel::paintEvent(), QGLPixmapBlurFilter::processGL(), qDrawBorder(), QPolygonF::QPolygonF(), qt_curves_for_arc(), qt_format_text(), qt_mac_compose_rect(), qt_mac_create_imagemask(), qt_scale_image_argb24_on_rgb16(), qt_scale_image_argb32_on_argb32(), qt_scale_image_argb32_on_rgb16(), qt_scale_image_rgb16_on_rgb16(), qt_scale_image_rgb32_on_rgb32(), qt_true_matrix(), QPaintEngineExPrivate::replayClipOperations(), scaleRect(), QPainter::setClipPath(), QPainter::setClipRect(), QGridLayoutEngine::setGeometries(), QDeclarativeLayoutItem::setGeometry(), QX11WindowSurface::setGeometry(), setPenAndDrawBackground(), QDeclarativeTextPrivate::setupTextLayout(), QDeclarativeRectFValueType::setValue(), stretchGradientToUserSpace(), QEmulationPaintEngine::stroke(), toAlignedRect_positive(), toNormalizedFillRect(), toRect_normalized(), and ShaderEffectItem::updateEffectState().
|
inline |
Returns the y-coordinate of the rectangle's top edge.
Equivalent to top().
Definition at line 667 of file qrect.h.
Referenced by QPainterPath::addEllipse(), QPainterPath::addRect(), QPainterPath::addRoundedRect(), QPainterPath::addRoundRect(), QPainterPath::arcTo(), QRenderRule::borderClip(), QPainter::boundingRect(), QGridLayoutEngine::cellRect(), QPathClipper::contains(), QPainter::PixmapFragment::create(), QTextLayout::draw(), QAlphaPaintEnginePrivate::drawAlphaImage(), QPainter::drawArc(), QTextDocumentLayoutPrivate::drawBlock(), QPainter::drawChord(), QCoreGraphicsPaintEngine::drawEllipse(), QVGPaintEngine::drawEllipse(), QRasterPaintEngine::drawEllipse(), QPainter::drawEllipse(), QPdfEngine::drawImage(), QCoreGraphicsPaintEngine::drawImage(), QX11PaintEngine::drawImage(), QVGPaintEngine::drawImage(), QSvgPaintEngine::drawImage(), QPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QPainter::drawImage(), QPSPrintEngine::drawImageInternal(), drawImageTiled(), QPainter::drawPath(), QPainter::drawPie(), QPdfEngine::drawPixmap(), QCoreGraphicsPaintEngine::drawPixmap(), QX11PaintEngine::drawPixmap(), QPainter::drawPixmap(), QVGPaintEngine::drawRects(), QPaintEngine::drawRects(), QPaintEngineEx::drawRects(), QPdfBaseEngine::drawRects(), QPainter::drawRects(), QPainter::drawRoundedRect(), QPainter::drawText(), QOpenGLPaintEngine::drawTextureRect(), QPSPrintEngine::drawTiledPixmap(), QCoreGraphicsPaintEngine::drawTiledPixmap(), QX11PaintEngine::drawTiledPixmap(), QVGPaintEngine::drawTiledPixmap(), QPaintEngine::drawTiledPixmap(), QRasterPaintEngine::drawTiledPixmap(), QPaintEngineEx::drawTiledPixmap(), QPainter::drawTiledPixmap(), drawVGImage(), QPdfEnginePrivate::embedFont(), QOutlineMapper::endOutline(), QEmulationPaintEngine::fill(), QEmulationPaintEngine::fillBGRect(), QBlitterPaintEngine::fillRect(), QVGPaintEngine::fillRect(), QPaintEngineEx::fillRect(), QBlitterPaintEnginePrivate::fillRect(), QGridLayoutEngine::fillRowData(), QDeclarativeCompiler::genLiteralAssignment(), QDeclarativeMouseArea::geometryChanged(), QPathClipper::intersect(), QDeclarativeContents::itemGeometryChanged(), QDeclarativeAnchorsPrivate::itemGeometryChanged(), QDeclarativeFlickablePrivate::itemGeometryChanged(), QLabelPrivate::layoutRect(), QMatrix::mapRect(), QTransform::mapRect(), QMatrix4x4::mapRect(), QSvgTinyDocument::mapSourceToTarget(), QDeclarativeTextEdit::moveCursorDelegate(), operator<<(), QDeclarativeText::paint(), QLabel::paintEvent(), qDrawBorder(), QPolygonF::QPolygonF(), qt_curves_for_arc(), qt_format_text(), qt_mac_compose_rect(), qt_mac_create_imagemask(), qt_painterpath_isect_curve(), qt_scale_image_argb24_on_rgb16(), qt_scale_image_argb32_on_argb32(), qt_scale_image_argb32_on_rgb16(), qt_scale_image_rgb16_on_rgb16(), qt_scale_image_rgb32_on_rgb32(), qt_true_matrix(), QPaintEngineExPrivate::replayClipOperations(), scaleRect(), QPainter::setClipPath(), QPainter::setClipRect(), QGridLayoutEngine::setGeometries(), QDeclarativeLayoutItem::setGeometry(), QX11WindowSurface::setGeometry(), setPenAndDrawBackground(), QDeclarativeTextPrivate::setupTextLayout(), QDeclarativeRectFValueType::setValue(), stretchGradientToUserSpace(), QEmulationPaintEngine::stroke(), toAlignedRect_positive(), toNormalizedFillRect(), toRect_normalized(), and ShaderEffectItem::updateEffectState().
Returns true if the rectangles r1 and r2 are different, otherwise returns false.
Definition at line 839 of file qrect.h.
|
related |
Returns true if the rectangles r1 and r2 are equal, otherwise returns false.
Definition at line 833 of file qrect.h.
|
related |
Reads a rectangle from the stream, and returns a reference to the stream.
Definition at line 2899 of file qrect.cpp.
|
private |
Definition at line 609 of file qrect.h.
Referenced by adjust(), adjusted(), center(), contains(), getCoords(), getRect(), height(), intersects(), isEmpty(), isNull(), isValid(), moveBottom(), moveCenter(), normalized(), operator!=(), operator==(), operator|(), QRectF(), setBottom(), setCoords(), setHeight(), setRect(), setSize(), setTop(), size(), toRect(), and translated().
|
private |
Definition at line 608 of file qrect.h.
Referenced by adjust(), adjusted(), center(), contains(), getCoords(), getRect(), intersects(), isEmpty(), isNull(), isValid(), moveCenter(), moveRight(), normalized(), operator!=(), operator==(), operator|(), QRectF(), setCoords(), setLeft(), setRect(), setRight(), setSize(), setWidth(), size(), toRect(), translated(), and width().
|
private |
Definition at line 606 of file qrect.h.
Referenced by adjust(), adjusted(), center(), contains(), getCoords(), getRect(), intersects(), moveCenter(), moveLeft(), moveRight(), moveTo(), normalized(), operator!=(), operator==(), operator|(), QRectF(), setCoords(), setLeft(), setRect(), setRight(), toRect(), translate(), translated(), and x().
|
private |
Definition at line 607 of file qrect.h.
Referenced by adjust(), adjusted(), center(), contains(), getCoords(), getRect(), intersects(), moveBottom(), moveCenter(), moveTo(), moveTop(), normalized(), operator!=(), operator==(), operator|(), QRectF(), setBottom(), setCoords(), setRect(), setTop(), toRect(), translate(), translated(), and y().