![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtCore\reentrant More...
#include <qrect.h>
Public Member Functions | |
constexpr | QRectF () noexcept |
Constructs a null rectangle. | |
constexpr | QRectF (const QPointF &topleft, const QSizeF &size) noexcept |
Constructs a rectangle with the given topLeft corner and the given size. | |
constexpr | QRectF (const QPointF &topleft, const QPointF &bottomRight) noexcept |
constexpr | QRectF (qreal left, qreal top, qreal width, qreal height) noexcept |
Constructs a rectangle with (x, y) as its top-left corner and the given width and height. | |
constexpr | QRectF (const QRect &rect) noexcept |
Constructs a QRectF rectangle from the given QRect rectangle. | |
constexpr bool | isNull () const noexcept |
Returns true if the rectangle is a null rectangle, otherwise returns false . | |
constexpr bool | isEmpty () const noexcept |
Returns true if the rectangle is empty, otherwise returns false . | |
constexpr bool | isValid () const noexcept |
Returns true if the rectangle is valid, otherwise returns false . | |
QRectF | normalized () const noexcept |
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height. | |
constexpr qreal | left () const noexcept |
Returns the x-coordinate of the rectangle's left edge. | |
constexpr qreal | top () const noexcept |
Returns the y-coordinate of the rectangle's top edge. | |
constexpr qreal | right () const noexcept |
Returns the x-coordinate of the rectangle's right edge. | |
constexpr qreal | bottom () const noexcept |
Returns the y-coordinate of the rectangle's bottom edge. | |
constexpr qreal | x () const noexcept |
Returns the x-coordinate of the rectangle's left edge. | |
constexpr qreal | y () const noexcept |
Returns the y-coordinate of the rectangle's top edge. | |
constexpr void | setLeft (qreal pos) noexcept |
Sets the left edge of the rectangle to the given finite x coordinate. | |
constexpr void | setTop (qreal pos) noexcept |
Sets the top edge of the rectangle to the given finite y coordinate. | |
constexpr void | setRight (qreal pos) noexcept |
Sets the right edge of the rectangle to the given finite x coordinate. | |
constexpr void | setBottom (qreal pos) noexcept |
Sets the bottom edge of the rectangle to the given finite y coordinate. | |
constexpr void | setX (qreal pos) noexcept |
Sets the left edge of the rectangle to the given finite x coordinate. | |
constexpr void | setY (qreal pos) noexcept |
Sets the top edge of the rectangle to the given finite y coordinate. | |
constexpr QPointF | topLeft () const noexcept |
Returns the position of the rectangle's top-left corner. | |
constexpr QPointF | bottomRight () const noexcept |
Returns the position of the rectangle's bottom-right corner. | |
constexpr QPointF | topRight () const noexcept |
Returns the position of the rectangle's top-right corner. | |
constexpr QPointF | bottomLeft () const noexcept |
Returns the position of the rectangle's bottom-left corner. | |
constexpr QPointF | center () const noexcept |
Returns the center point of the rectangle. | |
constexpr void | setTopLeft (const QPointF &p) noexcept |
Set the top-left corner of the rectangle to the given position. | |
constexpr void | setBottomRight (const QPointF &p) noexcept |
Set the bottom-right corner of the rectangle to the given position. | |
constexpr void | setTopRight (const QPointF &p) noexcept |
Set the top-right corner of the rectangle to the given position. | |
constexpr void | setBottomLeft (const QPointF &p) noexcept |
Set the bottom-left corner of the rectangle to the given position. | |
constexpr void | moveLeft (qreal pos) noexcept |
Moves the rectangle horizontally, leaving the rectangle's left edge at the given finite x coordinate. | |
constexpr void | moveTop (qreal pos) noexcept |
Moves the rectangle vertically, leaving the rectangle's top line at the given finite y coordinate. | |
constexpr void | moveRight (qreal pos) noexcept |
Moves the rectangle horizontally, leaving the rectangle's right edge at the given finite x coordinate. | |
constexpr void | moveBottom (qreal pos) noexcept |
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given finite y coordinate. | |
constexpr void | moveTopLeft (const QPointF &p) noexcept |
Moves the rectangle, leaving the top-left corner at the given position. | |
constexpr void | moveBottomRight (const QPointF &p) noexcept |
Moves the rectangle, leaving the bottom-right corner at the given position. | |
constexpr void | moveTopRight (const QPointF &p) noexcept |
Moves the rectangle, leaving the top-right corner at the given position. | |
constexpr void | moveBottomLeft (const QPointF &p) noexcept |
Moves the rectangle, leaving the bottom-left corner at the given position. | |
constexpr void | moveCenter (const QPointF &p) noexcept |
Moves the rectangle, leaving the center point at the given position. | |
constexpr void | translate (qreal dx, qreal dy) noexcept |
Moves the rectangle dx along the x-axis and dy along the y-axis, relative to the current position. | |
constexpr void | translate (const QPointF &p) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Moves the rectangle {offset}. | |
constexpr QRectF | translated (qreal dx, qreal dy) const noexcept |
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. | |
constexpr QRectF | translated (const QPointF &p) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a copy of the rectangle that is translated {offset}. | |
constexpr QRectF | transposed () const noexcept |
constexpr void | moveTo (qreal x, qreal y) noexcept |
Moves the rectangle, leaving the top-left corner at the given position (x, y). | |
constexpr void | moveTo (const QPointF &p) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Moves the rectangle, leaving the top-left corner at the given position. | |
constexpr void | setRect (qreal x, qreal y, qreal w, qreal h) noexcept |
Sets the coordinates of the rectangle's top-left corner to (x, y), and its size to the given width and height. | |
constexpr 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. | |
constexpr void | setCoords (qreal x1, qreal y1, qreal x2, qreal y2) noexcept |
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its bottom-right corner to (x2, y2). | |
constexpr 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. | |
constexpr void | adjust (qreal x1, qreal y1, qreal x2, qreal y2) noexcept |
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle. | |
constexpr QRectF | adjusted (qreal x1, qreal y1, qreal x2, qreal y2) const noexcept |
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of this rectangle. | |
constexpr QSizeF | size () const noexcept |
Returns the size of the rectangle. | |
constexpr qreal | width () const noexcept |
Returns the width of the rectangle. | |
constexpr qreal | height () const noexcept |
Returns the height of the rectangle. | |
constexpr void | setWidth (qreal w) noexcept |
Sets the width of the rectangle to the given finite width. | |
constexpr void | setHeight (qreal h) noexcept |
Sets the height of the rectangle to the given finite height. | |
constexpr void | setSize (const QSizeF &s) noexcept |
Sets the size of the rectangle to the given finite size. | |
QRectF | operator| (const QRectF &r) const noexcept |
Returns the bounding rectangle of this rectangle and the given rectangle. | |
QRectF | operator& (const QRectF &r) const noexcept |
Returns the intersection of this rectangle and the given rectangle. | |
QRectF & | operator|= (const QRectF &r) noexcept |
Unites this rectangle with the given rectangle. | |
QRectF & | operator&= (const QRectF &r) noexcept |
Intersects this rectangle with the given rectangle. | |
bool | contains (const QRectF &r) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if the given rectangle is inside this rectangle; otherwise returns false . | |
bool | contains (const QPointF &p) const noexcept |
Returns true if the given point is inside or on the edge of the rectangle; otherwise returns false . | |
bool | contains (qreal x, qreal y) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if the point (x, y) is inside or on the edge of the rectangle; otherwise returns false . | |
QRectF | united (const QRectF &other) const noexcept |
QRectF | intersected (const QRectF &other) const noexcept |
bool | intersects (const QRectF &r) const noexcept |
Returns true if this rectangle intersects with the given rectangle (i.e. | |
constexpr QRectF | marginsAdded (const QMarginsF &margins) const noexcept |
constexpr QRectF | marginsRemoved (const QMarginsF &margins) const noexcept |
constexpr QRectF & | operator+= (const QMarginsF &margins) noexcept |
constexpr QRectF & | operator-= (const QMarginsF &margins) noexcept |
constexpr QRect | toRect () const noexcept |
Returns a QRect based on the values of this rectangle. | |
QRect | toAlignedRect () const noexcept |
Friends | |
constexpr bool | operator== (const QRectF &r1, const QRectF &r2) noexcept |
Returns true if the rectangles r1 and r2 are approximately equal, otherwise returns false . | |
constexpr bool | operator!= (const QRectF &r1, const QRectF &r2) noexcept |
Returns true if the rectangles r1 and r2 are sufficiently different, otherwise returns false . | |
Related Symbols | |
(Note that these are not member symbols.) | |
QRectF | operator+ (const QRectF &lhs, const QMarginsF &rhs) |
QRectF | operator- (const QRectF &lhs, const QMarginsF &rhs) |
QRectF | operator+ (const QMarginsF &lhs, const QRectF &rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QDataStream & | operator<< (QDataStream &stream, const QRectF &rectangle) |
Writes the rectangle to the stream, and returns a reference to the stream. | |
QDataStream & | operator>> (QDataStream &stream, QRectF &rectangle) |
Reads a rectangle from the stream, and returns a reference to the stream. | |
\inmodule QtCore
\reentrant
The QRectF class defines a finite rectangle in the plane using floating point precision.
A rectangle is normally expressed as a top-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 coordinates, or from a QPointF and a QSizeF. 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 provides 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 rectangle's dimensions as a QSizeF. 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:
\table \row
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.
|
inlineconstexprnoexcept |
Constructs a rectangle with the given topLeft corner and the given size.
|
inlineconstexprnoexcept |
Constructs a rectangle with the given topLeft and bottomRight corners.
|
inlineconstexprnoexcept |
Constructs a QRectF rectangle from the given QRect rectangle.
|
inlineconstexprnoexcept |
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
All parameters must be finite.
Definition at line 791 of file qrect.h.
Referenced by QPlainTextDocumentLayout::blockBoundingRect(), cellClipTest(), QTextLayout::draw(), QMacStylePrivate::drawFocusRing(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QtWaylandClient::QWaylandBradientDecoration::paint(), QGraphicsGridLayout::setGeometry(), QGraphicsLinearLayout::setGeometry(), QSGBasicInternalRectangleNode::updateGeometry(), and QQuickShapeSoftwareRenderer::updateNode().
|
inlineconstexprnoexcept |
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of this rectangle.
All parameters must be finite.
Definition at line 799 of file qrect.h.
Referenced by QGraphicsTextItemPrivate::_q_mouseOnEdge(), QPlainTextEditPrivate::_q_repaintContents(), QQuickTextNodeEngine::addFrameDecorations(), QMacStylePrivate::CocoaControl::adjustedControlFrame(), QAbstractTextDocumentLayout::blockWithMarkerAt(), QGraphicsPixmapItem::boundingRect(), QGraphicsLayoutItem::contentsRect(), convolute(), QWidgetTextControlPrivate::cursorRectPlusUnicodeDirectionMarkers(), QTextDocumentLayout::draw(), QPainterPrivate::draw_helper(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QQC2::QStyleHelper::drawDial(), QMacStylePrivate::drawFocusRing(), QGraphicsScenePrivate::drawItemHelper(), QTextDocumentLayoutPrivate::drawListItem(), QQC2::QWindowsXPStyle::drawPrimitive(), QtWaylandClient::QWaylandBradientDecoration::paint(), QQuickFusionDial::paint(), QGraphicsWidget::paintWindowFrame(), qt_graphicsItem_highlightSelected(), QQuickDialogButtonBoxPrivate::resizeContent(), QPaintEngineEx::stroke(), QOpenGL2PaintEngineExPrivate::stroke(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QQuickTextArea::updatePaintNode(), QQuickTextEdit::updatePaintNode(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QGeoMapPolylineGeometry::updateSourcePoints(), QGraphicsWidget::windowFrameGeometry(), QGraphicsWidget::windowFrameRect(), and src_gui_painting_qpainter2::MyWidget::wrapper15().
|
inlineconstexprnoexcept |
Returns the y-coordinate of the rectangle's bottom edge.
Definition at line 499 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QPlainTextEditPrivate::append(), QGlyphRun::boundingRect(), QQuickTableViewPrivate::canLoadTableEdge(), QQuickTableViewPrivate::canUnloadTableEdge(), QQuickTableViewPrivate::clampedCellAtPos(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), BorderPaginator::clipRect(), QWidgetWindowPrivate::closestAcceptableGeometry(), RenderHelpers::correctViewportCoordinates(), QScrollerPrivate::createScrollingSegments(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawBorder(), QPdfEngine::drawHyperlink(), QRasterPaintEngine::drawImage(), QTextDocumentLayoutPrivate::drawTableCell(), QQuickTextAreaPrivate::ensureCursorVisible(), QGraphicsView::ensureVisible(), QScroller::ensureVisible(), QPlainTextEditPrivate::ensureVisible(), QOpenGL2PaintEngineExPrivate::fill(), QBlitterPaintEngine::fillRect(), QQuickTableViewPrivate::getAlignmentContentY(), QIntersectionFinder::hasIntersections(), QPlainTextEditControl::hitTest(), QTextDocumentLayoutPrivate::hitTest(), QPainterPath::intersects(), QRasterPaintEnginePrivate::isUnclipped(), QTextDocumentLayoutPrivate::layoutBlock(), QScrollerPrivate::nextSnapPos(), QPlainTextEditPrivate::pageUpDown(), QSGSoftwareInternalImageNode::paint(), QVideoFrame::paint(), QQuickTableView::positionViewAtRow(), QDashStroker::processCurrentSubpath(), qClipLine(), QSGOpenVGHelpers::qDrawBorderImage(), qsgsimpletexturenode_update(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_transform_image(), QRasterizer::rasterize(), QSGImageNode::rebuildGeometry(), QSGNinePatchNode::rebuildGeometry(), QGraphicsViewPrivate::recalculateContentSize(), QQuickPopupPositioner::reposition(), QOpenGL2PaintEngineExPrivate::resetClipIfNeeded(), QScrollerPrivate::scrollingSegmentsValid(), QQuickTableViewPrivate::scrollTowardsSelectionPoint(), QQuickTableViewPrivate::selectionRectangle(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QQuickTextEditPrivate::transformChanged(), QQuickTableViewPrivate::updateContentHeight(), QQuickTableViewPrivate::updateExtents(), QSGBasicInternalImageNode::updateGeometry(), QSGBasicInternalRectangleNode::updateGeometry(), QSGBasicInternalImageNode::updateGeometry(), QQuickTextEdit::updatePaintNode(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QSGGeometry::updateTexturedRectGeometry(), QPlainTextEditPrivate::verticalOffset(), and visibleGlyphRange().
|
inlineconstexprnoexcept |
Returns the position of the rectangle's bottom-left corner.
Definition at line 513 of file qrect.h.
Referenced by QTextLayout::draw(), drawCellBorder(), QtWaylandClient::QWaylandBradientDecoration::paint(), QtPrivate::PageItem::paint(), qgeotiledmapscene_isTileInViewport_rotationTilt(), QSGOpenVGRectangleNode::render(), and QSGVideoNode::setTexturedRectGeometry().
|
inlineconstexprnoexcept |
Returns the position of the rectangle's bottom-right corner.
Definition at line 511 of file qrect.h.
Referenced by QPlainTextDocumentLayout::blockBoundingRect(), QTextLayout::draw(), drawCellBorder(), QtWaylandClient::QWaylandBradientDecoration::paint(), QtPrivate::PageItem::paint(), qgeotiledmapscene_isTileInViewport_rotationTilt(), qgeotiledmapscene_isTileInViewport_Straight(), qt_toQuadratics(), QSGOpenVGRectangleNode::render(), scoreQuadratic(), QQuickPdfSelection::selectAll(), QSGVideoNode::setTexturedRectGeometry(), and QQuickTableViewPrivate::syncLoadedTableRectFromLoadedTable().
|
inlineconstexprnoexcept |
Returns the center point of the rectangle.
Definition at line 685 of file qrect.h.
Referenced by QQuickTextNodeEngine::addTextBlock(), QQuickMaterialRipple::anchorPoint(), centerOffset(), QGraphicsView::centerOn(), QQuickEllipseExtruder::contains(), correctMVPForScissor(), QGeoCameraTilesPrivate::createFrustum(), QQC2::QStyleHelper::drawDial(), QDeclarativePolygonMapItem::geometryChange(), QDeclarativePolylineMapItem::geometryChange(), QDeclarativeRectangleMapItem::geometryChange(), QQuickBasicDial::paint(), QQuickFusionDial::paint(), QVideoFrame::paint(), QLibInputTouch::processTouchMotion(), QVideoWindowPrivate::render(), QQuickTableViewPrivate::setCurrentIndexFromKeyEvent(), QGraphicsView::setScene(), QGeoTiledMapScenePrivate::setupCamera(), QtAndroidInput::touchCancel(), QtAndroidInput::touchEnd(), and QGraphicsVideoItemPrivate::updateRects().
|
noexcept |
Returns true
if the given point is inside or on the edge of the rectangle; otherwise returns false
.
|
noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true
if the given rectangle is inside this rectangle; otherwise returns false
.
Definition at line 1985 of file qrect.cpp.
Referenced by QAbstractTextDocumentLayout::blockWithMarkerAt(), QPathClipper::clip(), QmlJSDebugger::collectItemsAt(), QGraphicsTextItem::contains(), QQuickParticleExtruder::contains(), QQuickEllipseExtruder::contains(), QQuickRectangleExtruder::contains(), QPixmapConvolutionFilter::draw(), QPainter::drawPixmapFragments(), QOutlineMapper::endOutline(), QScroller::ensureVisible(), QGraphicsViewPrivate::findItems(), QAbstractTextDocumentLayout::formatAt(), QtPrivate::intersect_point(), QtPrivate::intersect_rect(), QmlJSDebugger::itemAt(), QMenuSloppyState::processMouseEvent(), QApplicationPrivate::sendMouseEvent(), and QDeclarativeCircleMapItemPrivateCPU::updatePolish().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true
if the point (x, y) is inside or on the edge of the rectangle; otherwise returns false
.
Definition at line 816 of file qrect.h.
References contains().
|
inlineconstexpr |
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.
|
inlineconstexpr |
Extracts the position of the rectangle's top-left corner to *x and y, and its dimensions to *width and *height.
|
inlineconstexprnoexcept |
Returns the height of the rectangle.
Definition at line 718 of file qrect.h.
Referenced by QSvgImage::QSvgImage(), _q_boundGeometryToSizeConstraints(), QPathSegments::addPath(), QOpenGL2PEXVertexArray::addPath(), alignedRect(), QQuickTextPrivate::anchorAt(), QQuickMaterialRipple::anchorPoint(), QPlainTextEditControl::blockBoundingRect(), QAbstractTextDocumentLayout::blockWithMarkerAt(), QQuickBorderImagePrivate::calculateRects(), QWaylandViewporterPrivate::Viewport::checkCommittedState(), QQuickTableViewPrivate::clampedCellAtPos(), QGeoMapPrivate::clampVisibleArea(), QQuickContext2D::closePath(), QSSGRenderCamera::computeFrustumOrtho(), QQuickEllipseExtruder::contains(), QQuickMaskExtruder::contains(), correctMVPForScissor(), RenderHelpers::correctViewportCoordinates(), QPainter::PixmapFragment::create(), createRectNode(), QPlainTextDocumentLayout::documentChanged(), QTextLayout::draw(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QMacStylePrivate::drawFocusRing(), QPaintEngine::drawImage(), QCoreGraphicsPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QPdfEngine::drawImage(), QPainter::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QPainter::drawPath(), QCoreGraphicsPaintEngine::drawPixmap(), QWindowsDirect2DPaintEngine::drawPixmap(), QX11PaintEngine::drawPixmap(), QPdfEngine::drawPixmap(), QPainter::drawPixmap(), QPaintEngine::drawRects(), QPainter::drawRects(), QPdfEngine::drawRects(), QX11PaintEngine::drawRects(), QTextDocumentLayoutPrivate::drawTableCell(), QWin32PrintEngine::drawTiledPixmap(), QOutlineMapper::endOutline(), QScroller::ensureVisible(), QPlainTextEditPrivate::ensureVisible(), QBlitterPaintEnginePrivate::fillRect(), QGraphicsView::fitInView(), QQuickItem::geometryChange(), QQuickPopup::geometryChange(), QQuickFlickable::geometryChange(), QQuickGridView::geometryChange(), QQuickListView::geometryChange(), QQuickText::geometryChange(), QQuickTextEdit::geometryChange(), QQuickTextInput::geometryChange(), QQuickControl::geometryChange(), QQuickMenuBarItem::geometryChange(), QQuickStackView::geometryChange(), QQuickTableViewPrivate::getAlignmentContentY(), QT_BEGIN_NAMESPACE::getAspectRatio(), QQuickTableViewPrivate::getEffectiveRowHeight(), QSGDistanceFieldGlyphCache::glyphMetrics(), QAndroidPlatformScreen::grabWindow(), QScrollerPrivate::handleDrag(), QQuickTextMetrics::height(), QPlainTextEditControl::hitTest(), QPdfDocumentPrivate::hitTest(), QQuickTextNodeEngine::BinaryTreeNode::insert(), QSSGLayerRenderPreparationResult::isLayerVisible(), QRasterPaintEnginePrivate::isUnclipped(), QQuickScrollBarAttachedPrivate::itemGeometryChanged(), QQuickScrollIndicatorAttachedPrivate::itemGeometryChanged(), QQuickListViewPrivate::itemGeometryChanged(), QQuickMultiEffectPrivate::itemRect(), QTextDocumentLayoutPrivate::layoutBlock(), QPrintPreviewWidgetPrivate::layoutPages(), QLabelPrivate::layoutRect(), QScrollerPrivate::moveWhilePressed(), QPlainTextEditPrivate::pageUpDown(), QSGSoftwareInternalImageNode::paint(), QQuickBasicDial::paint(), QVideoFrame::paint(), QFontFamilyDelegate::paint(), QScrollerPrivate::prepareScrolling(), QTextDocument::print(), printPage(), QDashedStrokeProcessor::process(), qDrawBorder(), QSGOpenVGHelpers::qDrawBorderImage(), QSGOpenVGHelpers::qDrawSubImage(), QSGOpenVGHelpers::qDrawTiled(), qsgsimpletexturenode_update(), qt_drawImage(), qt_graphicsItem_highlightSelected(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_mac_create_imagemask(), qt_painterpath_isect_curve(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_scale_image_argb32_on_argb32(), qt_scale_image_argb32_on_rgb16(), qt_scale_image_rgb16_on_rgb16(), qt_scale_image_rgb32_on_rgb32(), QSGImageNode::rebuildGeometry(), QGraphicsViewPrivate::recalculateContentSize(), QVideoWindowPrivate::render(), QSGOpenVGGlyphNode::render(), QSGOpenVGInternalImageNode::render(), QSGOpenVGInternalRectangleNode::render(), QSGOpenVGRectangleNode::render(), QSGOpenVGImageNode::render(), QSGOpenVGSpriteNode::render(), QGraphicsView::render(), QGraphicsScene::render(), QEvdevTouchScreenData::reportPoints(), QQuickPopupPositioner::reposition(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QWaylandTextInputPrivate::sendInputPanelState(), QScrollerPrivate::setContentPositionHelperDragging(), QSGDistanceFieldGlyphCache::setGlyphsPosition(), QQuickTextPrivate::setupTextLayout(), QSvgNode::shouldDrawNode(), QOpenGLTextureBlitter::sourceTransform(), sourceTransform(), stretchGradientToUserSpace(), QPaintEngineEx::stroke(), QQuickMaterialProgressBarNode::sync(), QQuickUniversalProgressBarNode::sync(), QQuickTableViewPrivate::tableLayoutToString(), to_d2d_rect_f(), QQuickTableViewPrivate::updateAverageRowHeight(), QQuickMultiEffectPrivate::updateCenterOffset(), QQuickMaterialRippleWaveNode::updateCurrentTime(), QSGBasicInternalImageNode::updateGeometry(), QSGBasicInternalRectangleNode::updateGeometry(), QSGBasicInternalImageNode::updateGeometry(), QWavefrontMesh::updateGeometry(), QQuickGridMesh::updateGeometry(), QQuickBorderImageMesh::updateGeometry(), QQuickBorderImage::updatePaintNode(), QQuickImage::updatePaintNode(), QQuickPaintedItem::updatePaintNode(), QQuickShaderEffectSource::updatePaintNode(), QQuickStyleItem::updatePaintNode(), QWaylandQuickItem::updatePaintNode(), QGeoMapMapboxGLPrivate::updateSceneGraph(), QQuickMultiEffectPrivate::updateSourcePadding(), QQuick3DTexture::updateSpatialNode(), and QSGRhiShaderEffectMaterialShader::updateUniformData().
Returns the intersection of this rectangle and the given rectangle. Note that {r.intersected(s)}
is equivalent to {r
& s}.
Definition at line 833 of file qrect.h.
Referenced by QPlainTextEditPrivate::_q_repaintContents(), QTextEditPrivate::_q_repaintContents(), QTextLayout::draw(), QPainterPrivate::draw_helper(), QX11PaintEngine::drawRects(), QuickTestResult::grabImage(), QAndroidPlatformScreen::grabWindow(), QQuickPopupPositioner::reposition(), and QWaylandTextInputPrivate::sendInputPanelState().
|
noexcept |
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 2263 of file qrect.cpp.
Referenced by QQuickTextNodeEngine::addTextBlock(), cellClipTest(), QPathClipper::clip(), QGraphicsItem::collidesWithPath(), QOutlineMapper::curveTo(), QRasterPaintEngine::fill(), QtPrivate::intersect_point(), QtPrivate::intersect_rect(), QQuickItemViewTransitionableItem::prepareTransition(), qgeotiledmapscene_isTileInViewport_rotationTilt(), qgeotiledmapscene_isTileInViewport_Straight(), QQuickTableViewPrivate::scheduleRebuildIfFastFlick(), QPainterPath::toFillPolygons(), QGeoMapPolylineGeometry::updateSourcePoints(), and QGeoMapPolygonGeometry::updateSourcePoints().
|
inlineconstexprnoexcept |
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 647 of file qrect.h.
Referenced by QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QGraphicsItem::clipPath(), QPlatformWindow::closestAcceptableGeometry(), createRectNode(), QPixmapConvolutionFilter::draw(), QPainterPrivate::draw_helper(), QPdfEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QPdfEngine::drawPixmap(), QX11PaintEngine::drawRects(), QGraphicsView::fitInView(), QAndroidPlatformScreen::grabWindow(), QQuickTableViewPrivate::loadInitialTable(), QSGDistanceFieldGlyphCache::populate(), QDashStroker::processCurrentSubpath(), QGraphicsScenePrivate::processDirtyItemsRecursive(), QQuickTableViewPrivate::relayoutTableItems(), QDeclarativeGeoMap::setVisibleArea(), QSvgNode::transformedBounds(), QSGBasicInternalImageNode::updateGeometry(), QQuickImage::updatePaintNode(), QGfxSourceProxy::updatePolish(), and QGeoMapMapboxGLPrivate::updateSceneGraph().
|
inlineconstexprnoexcept |
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 644 of file qrect.h.
Referenced by QPainterPath::addEllipse(), QGlyphRun::boundingRect(), centerOffset(), convolute(), QGeoCameraTilesPrivate::createFrustum(), QTextLayout::draw(), QPixmapConvolutionFilter::draw(), QPixmapBlurFilter::draw(), QPixmapColorizeFilter::draw(), QPdfDocument::getAllText(), QPdfDocument::getSelection(), QPdfDocument::getSelectionAtIndex(), QQuickItemViewTransitionableItem::prepareTransition(), QScrollerPrivate::pressWhileInactive(), QGraphicsScene::render(), QGeoTiledMapScenePrivate::setupCamera(), QPaintEngineEx::stroke(), and QSvgTinyDocument::viewBox().
|
inlineconstexprnoexcept |
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 652 of file qrect.h.
Referenced by QPlainTextEditPrivate::_q_repaintContents(), QTextEditPrivate::_q_repaintContents(), QTextLayoutStruct::addUpdateRectForFloat(), cellClipTest(), clipIfValid(), QTextDocumentLayout::documentChanged(), QWidgetTextControlPrivate::dragLeaveEvent(), QWidgetTextControlPrivate::dragMoveEvent(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawBorder(), QWindowsDirect2DPaintEngine::drawPixmap(), QTextDocumentLayoutPrivate::drawTableCellBorder(), QPlainTextEditPrivate::ensureVisible(), QRasterPaintEngine::fill(), QQuickTableViewPrivate::getAlignmentContentX(), QQuickTableViewPrivate::getAlignmentContentY(), QQuickContext2DImageTexture::grabImage(), QAndroidPlatformScreen::grabWindow(), QWindowsWindow::handleGeometryChangingMessage(), QTextDocumentLayoutPrivate::layoutBlock(), QTextDocumentLayoutPrivate::layoutFlow(), QTextDocumentLayoutPrivate::layoutFrame(), QQuickTableView::positionViewAtColumn(), QQuickTableView::positionViewAtRow(), scaleRect(), QQC2::scaleRect(), QDeclarativeGeoMap::setVisibleArea(), QWaylandQuickItem::updatePaintNode(), and QQuickTextEdit::updatePaintNode().
|
inlineconstexprnoexcept |
Returns the x-coordinate of the rectangle's left edge.
Equivalent to x().
Definition at line 496 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QQuickTextNodeEngine::addToSceneGraph(), QGlyphRun::boundingRect(), QQuickBorderImagePrivate::calculateRects(), QQuickTableViewPrivate::canLoadTableEdge(), QQuickTableViewPrivate::canUnloadTableEdge(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QWidgetWindowPrivate::closestAcceptableGeometry(), QScrollerPrivate::createScrollingSegments(), QTextDocumentLayoutPrivate::drawBorder(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QMacStylePrivate::drawFocusRing(), QPdfEngine::drawHyperlink(), QRasterPaintEngine::drawImage(), QTextDocumentLayoutPrivate::drawTableCell(), QWin32PrintEngine::drawTiledPixmap(), QQuickTextAreaPrivate::ensureCursorVisible(), QGraphicsView::ensureVisible(), QScroller::ensureVisible(), QOpenGL2PaintEngineExPrivate::fill(), QAndroidPlatformScreen::grabWindow(), QIntersectionFinder::hasIntersections(), QTextDocumentLayoutPrivate::hitTest(), QDeclarativeCircleMapItemPrivate::includeOnePoleInPath(), QQuickTextNodeEngine::BinaryTreeNode::insert(), QPainterPath::intersects(), QRasterPaintEnginePrivate::isUnclipped(), QScrollerPrivate::nextSnapPos(), QtWaylandClient::QWaylandBradientDecoration::paint(), QSGSoftwareInternalImageNode::paint(), QVideoFrame::paint(), QQuickTableView::positionViewAtColumn(), printPage(), QDashStroker::processCurrentSubpath(), qClipLine(), qDrawBorder(), QSGOpenVGHelpers::qDrawBorderImage(), qsgsimpletexturenode_update(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_transform_image(), QSGImageNode::rebuildGeometry(), QSGNinePatchNode::rebuildGeometry(), QGraphicsViewPrivate::recalculateContentSize(), QSGOpenVGInternalImageNode::render(), QGraphicsView::render(), QGraphicsScene::render(), QQuickPopupPositioner::reposition(), QOpenGL2PaintEngineExPrivate::resetClipIfNeeded(), QScrollerPrivate::scrollingSegmentsValid(), QQuickTableViewPrivate::scrollTowardsSelectionPoint(), QWidgetTextControl::selectionRect(), QQuickTableViewPrivate::selectionRectangle(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), QQuickTableViewPrivate::updateExtents(), QSGBasicInternalImageNode::updateGeometry(), QSGBasicInternalRectangleNode::updateGeometry(), QSGBasicInternalImageNode::updateGeometry(), QWavefrontMesh::updateGeometry(), QQuickGridMesh::updateGeometry(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QGeoMapPolylineGeometry::updateSourcePoints(), QGeoMapPolygonGeometry::updateSourcePoints(), QSGGeometry::updateTexturedRectGeometry(), visibleGlyphRange(), and visualRect().
Returns a rectangle grown by the margins.
Removes the margins from the rectangle, shrinking it.
Definition at line 881 of file qrect.h.
Referenced by QSGOpenVGNinePatchNode::render().
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given finite y coordinate.
The rectangle's size is unchanged.
Definition at line 697 of file qrect.h.
References pos.
Referenced by QQuickTableViewPrivate::updateExtents().
Moves the rectangle, leaving the bottom-left corner at the given position.
The rectangle's size is unchanged.
Moves the rectangle, leaving the bottom-right corner at the given position.
The rectangle's size is unchanged.
Moves the rectangle, leaving the center point at the given position.
The rectangle's size is unchanged.
Definition at line 712 of file qrect.h.
Referenced by QQuickTextNodeEngine::addTextBlock(), QEvdevTouchScreenData::addTouchPoint(), QtWaylandClient::QWaylandInputDevice::handleTouchPoint(), QVideoFrame::paint(), QLibInputTouch::processTouchDown(), QLibInputTouch::processTouchMotion(), QEvdevTouchScreenData::reportPoints(), QtWaylandClient::QWaylandTouchExtension::touch_extension_touch(), and QGraphicsVideoItemPrivate::updateRects().
Moves the rectangle horizontally, leaving the rectangle's left edge at the given finite x coordinate.
The rectangle's size is unchanged.
Definition at line 688 of file qrect.h.
References pos.
Referenced by QQuickTableViewPrivate::relayoutTableItems(), QGridLayoutEngine::setGeometries(), and QQuickTableViewPrivate::updateExtents().
Moves the rectangle horizontally, leaving the rectangle's right edge at the given finite x coordinate.
The rectangle's size is unchanged.
Definition at line 694 of file qrect.h.
References pos.
Referenced by QQuickTableViewPrivate::updateExtents(), and visualRect().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Moves the rectangle, leaving the top-left corner at the given position.
Moves the rectangle, leaving the top-left corner at the given position (x, y).
The rectangle's size is unchanged. Both parameters must be finite.
Definition at line 736 of file qrect.h.
Referenced by convolute(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), and QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget().
Moves the rectangle vertically, leaving the rectangle's top line at the given finite y coordinate.
The rectangle's size is unchanged.
Definition at line 691 of file qrect.h.
References pos.
Referenced by QPrintPreviewWidgetPrivate::_q_fit(), QQuickTableViewPrivate::relayoutTableItems(), QGridLayoutEngine::setGeometries(), QQuickTextPrivate::setupTextLayout(), QQuickMaterialProgressBarNode::sync(), QQuickUniversalProgressBarNode::sync(), and QQuickTableViewPrivate::updateExtents().
Moves the rectangle, leaving the top-left corner at the given position.
The rectangle's size is unchanged.
Definition at line 700 of file qrect.h.
Referenced by QQuickTextNodeEngine::addImage(), QAndroidPlatformScreen::grabWindow(), and QQuickTableViewPrivate::shiftLoadedTableRect().
Moves the rectangle, leaving the top-right corner at the given position.
The rectangle's size is unchanged.
Definition at line 703 of file qrect.h.
Referenced by QQuickTextNodeEngine::addImage().
|
noexcept |
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 1514 of file qrect.cpp.
Referenced by QRasterPaintEngine::drawRects(), QWindowsDirect2DPaintEngine::drawRects(), QSvgPaintEngine::drawRects(), QRasterPaintEngine::drawTiledPixmap(), QRasterPaintEngine::fill(), qt_scale_image_16bit(), qt_scale_image_32bit(), and QQuickSelectionRectanglePrivate::updateHandles().
Returns the intersection of this rectangle and the given rectangle.
Returns an empty rectangle if there is no intersection.
Definition at line 2185 of file qrect.cpp.
References qMax(), qMin(), r1, r2, and t2.
Intersects this rectangle with the given rectangle.
Adds the margins to the rectangle, growing it.
Returns a rectangle shrunk by the margins.
Unites this rectangle with the given rectangle.
|
inlineconstexprnoexcept |
Returns the x-coordinate of the rectangle's right edge.
Definition at line 498 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QGlyphRun::boundingRect(), QQuickTableViewPrivate::canLoadTableEdge(), QQuickTableViewPrivate::canUnloadTableEdge(), QQuickTableViewPrivate::clampedCellAtPos(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QWidgetWindowPrivate::closestAcceptableGeometry(), QScrollerPrivate::createScrollingSegments(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawBorder(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QPdfEngine::drawHyperlink(), QRasterPaintEngine::drawImage(), QQuickTextAreaPrivate::ensureCursorVisible(), QGraphicsView::ensureVisible(), QScroller::ensureVisible(), QOpenGL2PaintEngineExPrivate::fill(), QBlitterPaintEngine::fillRect(), QQuickTableViewPrivate::getAlignmentContentX(), QPdfDocument::getSelection(), QIntersectionFinder::hasIntersections(), QTextDocumentLayoutPrivate::hitTest(), QPdfDocumentPrivate::hitTest(), QPainterPath::intersects(), QRasterPaintEnginePrivate::isUnclipped(), QScrollerPrivate::nextSnapPos(), QSGSoftwareInternalImageNode::paint(), QVideoFrame::paint(), QQuickTableView::positionViewAtColumn(), QDashStroker::processCurrentSubpath(), qClipLine(), QSGOpenVGHelpers::qDrawBorderImage(), qsgsimpletexturenode_update(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_transform_image(), QSGImageNode::rebuildGeometry(), QSGNinePatchNode::rebuildGeometry(), QGraphicsViewPrivate::recalculateContentSize(), QQuickPopupPositioner::reposition(), QOpenGL2PaintEngineExPrivate::resetClipIfNeeded(), QScrollerPrivate::scrollingSegmentsValid(), QQuickTableViewPrivate::scrollTowardsSelectionPoint(), QWidgetTextControl::selectionRect(), QQuickTableViewPrivate::selectionRectangle(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), QQuickTableViewPrivate::updateContentWidth(), QQuickTableViewPrivate::updateExtents(), QSGBasicInternalImageNode::updateGeometry(), QSGBasicInternalRectangleNode::updateGeometry(), QSGBasicInternalImageNode::updateGeometry(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QGeoMapPolygonGeometry::updateSourcePoints(), QSGGeometry::updateTexturedRectGeometry(), visibleGlyphRange(), QStyle::visualPos(), QQC2::QStyle::visualPos(), visualRect(), QStyle::visualRect(), and QQC2::QStyle::visualRect().
Sets the bottom edge of the rectangle to the given finite y coordinate.
May change the height, but will never change the top edge of the rectangle.
Definition at line 670 of file qrect.h.
References pos.
Referenced by BorderPaginator::clipRect(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawTableCell(), QTextDocumentLayoutPrivate::layoutBlock(), qsgsimpletexturenode_update(), QSGImageNode::rebuildGeometry(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), and QSGBasicInternalImageNode::updateGeometry().
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.
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.
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its bottom-right corner to (x2, y2).
All parameters must be finite.
Sets the height of the rectangle to the given finite height.
The bottom edge is changed, but not the top one.
Definition at line 807 of file qrect.h.
Referenced by QSvgImage::QSvgImage(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QScrollerPrivate::prepareScrolling(), QQuickTableViewPrivate::relayoutTableItems(), QQuickDrawerPrivate::resizeOverlay(), setupCameraForShadowMap(), QQuickTextPrivate::setupTextLayout(), QQuickMaterialProgressBarNode::sync(), QQuickUniversalProgressBarNode::sync(), QQuickStyleItem::updatePaintNode(), and QQuick3DTexture::updateSpatialNode().
Sets the left edge of the rectangle to the given finite x coordinate.
May change the width, but will never change the right edge of the rectangle.
Equivalent to setX().
Definition at line 661 of file qrect.h.
References pos.
Referenced by QPrintPreviewWidgetPrivate::_q_fit(), qsgsimpletexturenode_update(), QSGImageNode::rebuildGeometry(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), and QSGBasicInternalImageNode::updateGeometry().
|
inlineconstexprnoexcept |
Sets the coordinates of the rectangle's top-left corner to (x, y), and its size to the given width and height.
All parameters must be finite.
Definition at line 767 of file qrect.h.
Referenced by QGraphicsView::render(), and QGraphicsScene::render().
Sets the right edge of the rectangle to the given finite x coordinate.
May change the width, but will never change the left edge of the rectangle.
Definition at line 664 of file qrect.h.
References pos.
Referenced by QWidgetTextControlPrivate::_q_updateBlock(), QTextLayout::draw(), qsgsimpletexturenode_update(), QSGImageNode::rebuildGeometry(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), and QSGBasicInternalImageNode::updateGeometry().
Sets the size of the rectangle to the given finite size.
The top-left corner is not moved.
Definition at line 810 of file qrect.h.
Referenced by QGraphicsTextItemPrivate::_q_updateBoundingRect(), QGraphicsTextItemPrivate::textControl(), QGraphicsSvgItemPrivate::updateDefaultSize(), QQuickStyleItem::updatePaintNode(), and QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget().
Sets the top edge of the rectangle to the given finite y coordinate.
May change the height, but will never change the bottom edge of the rectangle.
Equivalent to setY().
Definition at line 667 of file qrect.h.
References pos.
Referenced by BorderPaginator::clipRect(), QTextDocumentLayoutPrivate::drawTableCell(), QTextDocumentLayoutPrivate::layoutBlock(), qsgsimpletexturenode_update(), QSGImageNode::rebuildGeometry(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), and QSGBasicInternalImageNode::updateGeometry().
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.
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.
Sets the width of the rectangle to the given finite width.
The right edge is changed, but not the left one.
Definition at line 804 of file qrect.h.
Referenced by QSvgImage::QSvgImage(), QPlainTextDocumentLayout::blockBoundingRect(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QPlainTextEdit::paintEvent(), QScrollerPrivate::prepareScrolling(), QQuickTableViewPrivate::relayoutTableItems(), QQuickDrawerPrivate::resizeOverlay(), setupCameraForShadowMap(), QQuickUniversalProgressBarNode::sync(), QQuickStyleItem::updatePaintNode(), and QQuick3DTexture::updateSpatialNode().
Sets the left edge of the rectangle to the given finite x coordinate.
May change the width, but will never change the right edge of the rectangle.
Equivalent to setLeft().
Definition at line 507 of file qrect.h.
References pos.
Referenced by QQuickDrawerPrivate::resizeOverlay().
Sets the top edge of the rectangle to the given finite y coordinate.
May change the height, but will never change the bottom edge of the rectangle.
Equivalent to setTop().
Definition at line 508 of file qrect.h.
References pos.
Referenced by QQuickDrawerPrivate::resizeOverlay().
|
inlineconstexprnoexcept |
Returns the size of the rectangle.
Definition at line 721 of file qrect.h.
Referenced by QGraphicsTextItemPrivate::_q_updateBoundingRect(), alignedRect(), QCommonStylePrivate::calculateElidedText(), QQC2::QCommonStylePrivate::calculateElidedText(), QQuickBorderImagePrivate::calculateRects(), CapabilitiesToStateMask::canBlitterDrawPixmap(), QGridLayoutEngine::cellRect(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QX11PaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QRasterPaintEngine::drawPixmap(), QWin32PrintEngine::drawPixmap(), QQuickLayoutItemProxy::geometryChange(), QQuickCanvasItem::geometryChange(), QQuickFramebufferObject::geometryChange(), QQuickImage::geometryChange(), QQuickIconImage::geometryChange(), QQuickItemGroup::geometryChange(), QQuickLayout::geometryChange(), QDeclarativeGeoMap::geometryChange(), QQuick3DViewport::geometryChange(), QQuickIconLabelPrivate::layout(), QPainterPath::operator==(), QVideoFrame::paint(), QStaticTextPrivate::paintText(), QGraphicsWidget::paintWindowFrame(), QTextDocument::print(), QSGOpenVGHelpers::qDrawBorderImage(), QVideoWindowPrivate::render(), QQuickDialogButtonBoxPrivate::resizeContent(), QQuickDrawerPrivate::resizeOverlay(), QQuickAnchorChanges::reverse(), QGridLayoutEngine::setGeometries(), QQuickItemViewFxItem::setGeometry(), QGraphicsWidget::size(), QSvgTinyDocument::size(), QFontMetricsF::size(), QWaylandSurfacePrivate::surface_commit(), QSSGLayerRenderPreparationResult::textureDimensions(), QVideoTextureHelper::SubtitleLayout::toImage(), QQuickCanvasItem::toImage(), QQuickMultiEffectPrivate::updateBlurItemSizes(), QGraphicsSvgItemPrivate::updateDefaultSize(), QWin32PrintEnginePrivate::updateMetrics(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QIOSScreen::updateProperties(), QGraphicsVideoItemPrivate::updateRects(), and QVideoWindowPrivate::updateSubtitle().
|
noexcept |
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 2330 of file qrect.cpp.
References qCeil(), and qFloor().
Referenced by QPlainTextEditPrivate::_q_repaintContents(), QTextEditPrivate::_q_repaintContents(), QFontMetrics::boundingRect(), convolute(), QPixmapBlurFilter::draw(), QPixmapColorizeFilter::draw(), QPainterPrivate::draw_helper(), QRasterPaintEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QRasterPaintEngine::drawPixmap(), QX11PaintEngine::drawRects(), QPainter::drawText(), QGraphicsItemPrivate::effectiveBoundingRect(), QuickTestResult::grabImage(), QRasterPaintEnginePrivate::isUnclipped(), QGraphicsViewPrivate::mapToViewRect(), QQuickLabsPlatformMenu::open(), QSGAbstractSoftwareRenderer::optimizeRenderList(), QSGDefaultPainterNode::paint(), QQuickUniversalFocusRectangle::paint(), QSGSoftwareInternalRectangleNode::setRect(), QQC2_NAMESPACE::QMacStyle::subControlRect(), and QQuickPaintedItem::update().
|
inlineconstexprnoexcept |
Returns the y-coordinate of the rectangle's top edge.
Equivalent to y().
Definition at line 497 of file qrect.h.
Referenced by _q_boundGeometryToSizeConstraints(), QGlyphRun::boundingRect(), QQuickTableViewPrivate::canLoadTableEdge(), QQuickTableViewPrivate::canUnloadTableEdge(), QBlitterPaintEnginePrivate::clipAndDrawPixmap(), BorderPaginator::clipRect(), QWidgetWindowPrivate::closestAcceptableGeometry(), QScrollerPrivate::createScrollingSegments(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawBorder(), QMacStylePrivate::drawFocusRing(), QPdfEngine::drawHyperlink(), QRasterPaintEngine::drawImage(), QTextDocumentLayoutPrivate::drawTableCell(), QTextDocumentLayoutPrivate::drawTableCellBorder(), QWin32PrintEngine::drawTiledPixmap(), QQuickTextAreaPrivate::ensureCursorVisible(), QGraphicsView::ensureVisible(), QScroller::ensureVisible(), QPlainTextEditPrivate::ensureVisible(), QOpenGL2PaintEngineExPrivate::fill(), QAndroidPlatformScreen::grabWindow(), QIntersectionFinder::hasIntersections(), QPlainTextEditControl::hitTest(), QTextDocumentLayoutPrivate::hitTest(), QPainterPath::intersects(), QRasterPaintEnginePrivate::isUnclipped(), QTextDocumentLayoutPrivate::layoutBlock(), QScrollerPrivate::nextSnapPos(), QTextEditPrivate::pageUpDown(), QPlainTextEditPrivate::pageUpDown(), QSGSoftwareInternalImageNode::paint(), QVideoFrame::paint(), QQuickTableView::positionViewAtRow(), printPage(), QDashStroker::processCurrentSubpath(), qClipLine(), QSGOpenVGHelpers::qDrawBorderImage(), qsgsimpletexturenode_update(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_transform_image(), QRasterizer::rasterize(), QSGImageNode::rebuildGeometry(), QSGNinePatchNode::rebuildGeometry(), QGraphicsViewPrivate::recalculateContentSize(), QSGOpenVGInternalImageNode::render(), QGraphicsView::render(), QGraphicsScene::render(), QQuickPopupPositioner::reposition(), QOpenGL2PaintEngineExPrivate::resetClipIfNeeded(), QScrollerPrivate::scrollingSegmentsValid(), QQuickTableViewPrivate::scrollTowardsSelectionPoint(), QQuickTableViewPrivate::selectionRectangle(), QGraphicsAnchorLayoutPrivate::setItemsGeometries(), QQuickTextEditPrivate::transformChanged(), QQuickTableViewPrivate::updateExtents(), QSGBasicInternalImageNode::updateGeometry(), QSGBasicInternalRectangleNode::updateGeometry(), QSGBasicInternalImageNode::updateGeometry(), QWavefrontMesh::updateGeometry(), QQuickGridMesh::updateGeometry(), QQuickTextEdit::updatePaintNode(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QGeoMapPolylineGeometry::updateSourcePoints(), QGeoMapPolygonGeometry::updateSourcePoints(), QSGGeometry::updateTexturedRectGeometry(), QQuickTextInputPrivate::updateVerticalScroll(), and visibleGlyphRange().
|
inlineconstexprnoexcept |
Returns the position of the rectangle's top-left corner.
Definition at line 510 of file qrect.h.
Referenced by QDistanceField::QDistanceField(), QQuickTextNodeEngine::addImage(), QQuickTextNodeEngine::addTextBlock(), QQuickMaskExtruder::contains(), QTextLayout::draw(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), drawCellBorder(), QMacStylePrivate::drawFocusRing(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QTextDocumentLayoutPrivate::drawTableCell(), QPlainTextEditPrivate::ensureVisible(), QDeclarativeGeoMapQuickItem::geometryChange(), QDeclarativePolygonMapItem::geometryChange(), QDeclarativePolylineMapItem::geometryChange(), QDeclarativeRectangleMapItem::geometryChange(), QAndroidPlatformScreen::grabWindow(), QTextDocumentLayoutPrivate::hitTest(), QGraphicsProxyWidget::inputMethodQuery(), QGraphicsSceneIndexPrivate::itemCollidesWithPath(), QQuickFlickablePrivate::itemGeometryChanged(), QQuickIconLabelPrivate::layout(), QtWaylandClient::QWaylandBradientDecoration::paint(), QVideoFrame::paint(), QtPrivate::PageItem::paint(), QLabel::paintEvent(), QGraphicsWidget::paintWindowFrame(), QSGOpenVGHelpers::qDrawBorderImage(), qgeotiledmapscene_isTileInViewport_rotationTilt(), qgeotiledmapscene_isTileInViewport_Straight(), qt_toQuadratics(), QSGOpenVGRectangleNode::render(), QQuickDialogButtonBoxPrivate::resizeContent(), QQuickDrawerPrivate::resizeOverlay(), QQuickAnchorChanges::reverse(), scoreQuadratic(), QQuickPdfSelection::selectAll(), QWaylandTextInputPrivate::sendInputPanelState(), QQuickItemViewFxItem::setGeometry(), QSGVideoNode::setTexturedRectGeometry(), QQuickTableViewPrivate::shiftLoadedTableRect(), QOpenGLTextureBlitter::sourceTransform(), sourceTransform(), QQuickTableViewPrivate::syncLoadedTableRectFromLoadedTable(), QTextDocumentLayout::tableCellBoundingRect(), QVideoTextureHelper::SubtitleLayout::toImage(), QQuickCanvasItem::toImage(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), and QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget().
|
inlineconstexprnoexcept |
Returns the position of the rectangle's top-right corner.
Definition at line 512 of file qrect.h.
Referenced by QQuickTextNodeEngine::addImage(), QTextLayout::draw(), drawCellBorder(), QRasterPaintEngine::drawImage(), QtWaylandClient::QWaylandBradientDecoration::paint(), QtPrivate::PageItem::paint(), qgeotiledmapscene_isTileInViewport_rotationTilt(), QSGOpenVGRectangleNode::render(), and QSGVideoNode::setTexturedRectGeometry().
|
inlineconstexprnoexcept |
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.
References qRound().
Referenced by QTextEditPrivate::_q_ensureVisible(), QSGAbstractSoftwareRenderer::backgroundRect(), BorderPaginator::clipRect(), QPixmapConvolutionFilter::draw(), QWindowsVistaStylePrivate::drawBackgroundDirectly(), QQC2::QWindowsXPStylePrivate::drawBackgroundDirectly(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QRasterPaintEngine::drawImage(), QPdfEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QWindowsDirect2DPaintEngine::drawPixmap(), QWin32PrintEngine::drawPixmap(), QPdfEngine::drawPixmap(), QDirectFbBlitter::drawPixmapOpacity(), QTextDocumentLayoutPrivate::drawTableCell(), QRasterPaintEngine::drawTiledPixmap(), QBlitterPaintEnginePrivate::fillRect(), QQuickContext2DImageTexture::grabImage(), QAndroidPlatformScreen::grabWindow(), QWindowsWindow::handleGeometryChangingMessage(), QQuickContext2D::init(), QGraphicsWidget::initStyleOption(), QGraphicsItemPrivate::initStyleOption(), QLabelPrivate::layoutPoint(), QSGAbstractSoftwareRenderer::markDirty(), QSGAbstractSoftwareRenderer::optimizeRenderList(), QtWaylandClient::QWaylandBradientDecoration::paint(), QSGSoftwareInternalImageNode::paint(), QSGSoftwareNinePatchNode::paint(), QLabel::paintEvent(), qt_scale_image_16bit(), qt_scale_image_32bit(), QGraphicsView::render(), QGraphicsScene::render(), screenInputItemRectangle(), QSGAbstractSoftwareRenderer::setBackgroundRect(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QMacStyle::subControlRect(), QQC2_NAMESPACE::QMacStyle::subElementRect(), and QSGSoftwareRenderableNodeUpdater::visit().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Moves the rectangle {offset}.
\l{QPointF::x()}{x()} along the x axis and {offset}.\l{QPointF::y()}{y()} along the y axis, relative to the current position.
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. Both parameters must be finite.
Definition at line 724 of file qrect.h.
Referenced by QMacStylePrivate::CocoaControl::adjustedControlFrame(), QGlyphRun::boundingRect(), QSvgUse::bounds(), QTextLayout::draw(), QTextDocumentLayoutPrivate::drawBlock(), QMacStylePrivate::drawFocusRing(), QTextDocumentLayoutPrivate::drawFrame(), QRasterPaintEngine::drawImage(), QX11PaintEngine::drawRects(), QRasterPaintEngine::drawTiledPixmap(), QTextDocumentLayoutPrivate::hitTest(), QQuickTextNodeEngine::BinaryTreeNode::insert(), QTextDocumentLayoutPrivate::layoutFlow(), QGraphicsViewPrivate::mapToViewRect(), QPlainTextEditPrivate::pageUpDown(), QGraphicsItem::sceneBoundingRect(), QGraphicsItemPrivate::sceneEffectiveBoundingRect(), and QPaintEngineEx::stroke().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a copy of the rectangle that is translated {offset}.
\l{QPointF::x()}{x()} along the x axis and {offset}.\l{QPointF::y()}{y()} along the y axis, relative to the current position.
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. Both parameters must be finite.
Definition at line 748 of file qrect.h.
Referenced by QQuickTextNodeEngine::addTextBlock(), QMacStylePrivate::CocoaControl::adjustedControlFrame(), QTextLayout::draw(), QPixmapBlurFilter::draw(), QWindowsVistaStylePrivate::drawBackgroundDirectly(), QQC2::QWindowsXPStylePrivate::drawBackgroundDirectly(), QQC2_NAMESPACE::QMacStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QMacStylePrivate::drawFocusRing(), QRasterPaintEngine::drawPixmap(), QGraphicsScenePrivate::drawSubtreeRecursive(), QPlainTextEditPrivate::ensureVisible(), QWindowsDirect2DWindow::flush(), QGraphicsTextItem::inputMethodQuery(), QtPrivate::intersect_path(), QtPrivate::intersect_point(), QtPrivate::intersect_rect(), QPlainTextEditPrivate::pageUpDown(), QLabel::paintEvent(), QPlainTextEdit::paintEvent(), QGraphicsScenePrivate::processDirtyItemsRecursive(), QWaylandTextInputPrivate::sendInputPanelState(), QSGOpenVGGlyphNode::setGlyphs(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QMacStyle::subControlRect(), QTextDocumentLayout::tableCellBoundingRect(), QQuickTextArea::updatePaintNode(), QGeoMapPolylineGeometry::updateSourcePoints(), QGeoMapPolygonGeometry::updateSourcePoints(), and QGraphicsWidgetPrivate::windowFrameHoverMoveEvent().
|
inlineconstexprnoexcept |
Returns a copy of the rectangle that has its width and height exchanged:
Definition at line 756 of file qrect.h.
Referenced by QQuickPopupPositioner::reposition().
Returns the bounding rectangle of this rectangle and the given rectangle.
Definition at line 838 of file qrect.h.
Referenced by QWaylandViewporterPrivate::Viewport::checkCommittedState(), QPdfDocument::getAllText(), QPdfDocument::getSelection(), QPdfDocument::getSelectionAtIndex(), QTextLayout::glyphRuns(), QQuickTextNodeEngine::mergeProcessedNodes(), and QQuickTextPrivate::setupTextLayout().
|
inlineconstexprnoexcept |
Returns the width of the rectangle.
Definition at line 715 of file qrect.h.
Referenced by QSvgImage::QSvgImage(), _q_boundGeometryToSizeConstraints(), QPathSegments::addPath(), QOpenGL2PEXVertexArray::addPath(), QQuickTextNodeEngine::addTextBlock(), alignedRect(), QQuickTextPrivate::anchorAt(), QQuickMaterialRipple::anchorPoint(), QPlainTextDocumentLayout::blockBoundingRect(), QAbstractTextDocumentLayout::blockWithMarkerAt(), QQuickBorderImagePrivate::calculateRects(), QWaylandViewporterPrivate::Viewport::checkCommittedState(), QQuickTableViewPrivate::clampedCellAtPos(), QGeoMapPrivate::clampVisibleArea(), QQuickContext2D::closePath(), QSSGRenderCamera::computeFrustumOrtho(), QQuickEllipseExtruder::contains(), QQuickMaskExtruder::contains(), correctMVPForScissor(), RenderHelpers::correctViewportCoordinates(), QPainter::PixmapFragment::create(), createRectNode(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QQC2::QStyleHelper::drawDial(), QPaintEngine::drawImage(), QCoreGraphicsPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QPdfEngine::drawImage(), QPainter::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QPainter::drawPath(), QCoreGraphicsPaintEngine::drawPixmap(), QWindowsDirect2DPaintEngine::drawPixmap(), QX11PaintEngine::drawPixmap(), QPdfEngine::drawPixmap(), QPainter::drawPixmap(), QPaintEngine::drawRects(), QPainter::drawRects(), QPdfEngine::drawRects(), QX11PaintEngine::drawRects(), QTextDocumentLayoutPrivate::drawTableCell(), QWin32PrintEngine::drawTiledPixmap(), QOutlineMapper::endOutline(), QScroller::ensureVisible(), QBlitterPaintEnginePrivate::fillRect(), QGraphicsView::fitInView(), QQuickItem::geometryChange(), QQuickPopup::geometryChange(), QQuickFlickable::geometryChange(), QQuickGridView::geometryChange(), QQuickListView::geometryChange(), QQuickText::geometryChange(), QQuickTextEdit::geometryChange(), QQuickTextInput::geometryChange(), QQuickControl::geometryChange(), QQuickStackView::geometryChange(), QQuickSwipeDelegate::geometryChange(), QQuickTumbler::geometryChange(), QQuickTableViewPrivate::getAlignmentContentX(), QT_BEGIN_NAMESPACE::getAspectRatio(), QQuickTableViewPrivate::getEffectiveColumnWidth(), QSGDistanceFieldGlyphCache::glyphMetrics(), QAndroidPlatformScreen::grabWindow(), QScrollerPrivate::handleDrag(), QQuickTextNodeEngine::BinaryTreeNode::insert(), QSSGLayerRenderPreparationResult::isLayerVisible(), QRasterPaintEnginePrivate::isUnclipped(), QQuickScrollBarAttachedPrivate::itemGeometryChanged(), QQuickScrollIndicatorAttachedPrivate::itemGeometryChanged(), QQuickListViewPrivate::itemGeometryChanged(), QQuickMultiEffectPrivate::itemRect(), QPrintPreviewWidgetPrivate::layoutPages(), QLabelPrivate::layoutRect(), QScrollerPrivate::moveWhilePressed(), QSGSoftwareInternalImageNode::paint(), QQuickBasicDial::paint(), QQuickFusionDial::paint(), QtPrivate::PageItem::paint(), QScrollerPrivate::prepareScrolling(), QTextDocument::print(), printPage(), QDashedStrokeProcessor::process(), qDrawBorder(), QSGOpenVGHelpers::qDrawBorderImage(), QSGOpenVGHelpers::qDrawSubImage(), QSGOpenVGHelpers::qDrawTiled(), qsgsimpletexturenode_update(), qt_drawImage(), qt_graphicsItem_highlightSelected(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_mac_create_imagemask(), qt_painterpath_isect_curve(), qt_scale_image_16bit(), qt_scale_image_32bit(), qt_scale_image_argb32_on_argb32(), qt_scale_image_argb32_on_rgb16(), qt_scale_image_rgb16_on_rgb16(), qt_scale_image_rgb32_on_rgb32(), QSGImageNode::rebuildGeometry(), QGraphicsViewPrivate::recalculateContentSize(), QVideoWindowPrivate::render(), QSGOpenVGGlyphNode::render(), QSGOpenVGInternalImageNode::render(), QSGOpenVGInternalRectangleNode::render(), QSGOpenVGRectangleNode::render(), QSGOpenVGImageNode::render(), QSGOpenVGSpriteNode::render(), QGraphicsView::render(), QGraphicsScene::render(), QEvdevTouchScreenData::reportPoints(), QQuickPopupPositioner::reposition(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QWaylandTextInputPrivate::sendInputPanelState(), QScrollerPrivate::setContentPositionHelperDragging(), QSGDistanceFieldGlyphCache::setGlyphsPosition(), QQuickTextPrivate::setupTextLayout(), QSvgNode::shouldDrawNode(), QOpenGLTextureBlitter::sourceTransform(), sourceTransform(), stretchGradientToUserSpace(), QPaintEngineEx::stroke(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QQuickUniversalProgressBarNode::sync(), QQuickTableViewPrivate::tableLayoutToString(), to_d2d_rect_f(), QQuickTableViewPrivate::updateAverageColumnWidth(), QQuickMultiEffectPrivate::updateCenterOffset(), QQuickMaterialRippleWaveNode::updateCurrentTime(), QQuickUniversalProgressBarNode::updateCurrentTime(), QSGBasicInternalImageNode::updateGeometry(), QSGBasicInternalRectangleNode::updateGeometry(), QSGBasicInternalImageNode::updateGeometry(), QWavefrontMesh::updateGeometry(), QQuickGridMesh::updateGeometry(), QQuickBorderImageMesh::updateGeometry(), QQuickBorderImage::updatePaintNode(), QQuickImage::updatePaintNode(), QQuickPaintedItem::updatePaintNode(), QQuickShaderEffectSource::updatePaintNode(), QQuickStyleItem::updatePaintNode(), QWaylandQuickItem::updatePaintNode(), QGeoMapMapboxGLPrivate::updateSceneGraph(), QQuickMultiEffectPrivate::updateSourcePadding(), QQuick3DTexture::updateSpatialNode(), QSGRhiShaderEffectMaterialShader::updateUniformData(), QStyle::visualRect(), QQC2::QStyle::visualRect(), and QQuickTextMetrics::width().
|
inlineconstexprnoexcept |
Returns the x-coordinate of the rectangle's left edge.
Equivalent to left().
Definition at line 655 of file qrect.h.
Referenced by QQuickTextNodeEngine::addTextBlock(), alignedRect(), alignedRect(), QQuickTableViewPrivate::calculateTopLeft(), QQuickTableViewPrivate::canUnloadTableEdge(), QGridLayoutEngine::cellRect(), QQuickTableViewPrivate::checkForVisibilityChanges(), QQuickTableViewPrivate::clampedCellAtPos(), QGeoMapPrivate::clampVisibleArea(), RenderHelpers::correctViewportCoordinates(), QPainter::PixmapFragment::create(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QX11PaintEngine::drawImage(), QPaintEngine::drawImage(), QCoreGraphicsPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QPdfEngine::drawImage(), QPainter::drawImage(), QPainter::drawPath(), QCoreGraphicsPaintEngine::drawPixmap(), QX11PaintEngine::drawPixmap(), QPdfEngine::drawPixmap(), QPainter::drawPixmap(), QPaintEngine::drawRects(), QPaintEngineEx::drawRects(), QPdfEngine::drawRects(), QX11PaintEngine::drawRects(), QOutlineMapper::endOutline(), QBlitterPaintEngine::fillRect(), QBlitterPaintEnginePrivate::fillRect(), QQuickItem::geometryChange(), QQuickMouseArea::geometryChange(), QQuickTableViewPrivate::getAlignmentContentX(), QQuickTableViewPrivate::getEffectiveColumnX(), QPdfDocument::getSelection(), QSGDistanceFieldGlyphCache::glyphMetrics(), QQuickListViewPrivate::itemGeometryChanged(), QLabelPrivate::layoutRect(), QSGSoftwareInternalImageNode::paint(), QLabel::paintEvent(), qDrawBorder(), QSGOpenVGHelpers::qDrawBorderImage(), QSGOpenVGHelpers::qDrawSubImage(), QSGOpenVGHelpers::qDrawTiled(), qt_drawImage(), qt_mac_create_imagemask(), qt_scale_image_argb32_on_argb32(), qt_scale_image_argb32_on_rgb16(), qt_scale_image_rgb16_on_rgb16(), qt_scale_image_rgb32_on_rgb32(), QQuickTableViewPrivate::relayoutTableItems(), QSGOpenVGInternalImageNode::render(), QSGOpenVGRectangleNode::render(), QSGOpenVGImageNode::render(), QSGOpenVGSpriteNode::render(), QQuickTableViewPrivate::scheduleRebuildIfFastFlick(), QQuickTableViewPrivate::scrollTowardsSelectionPoint(), QWaylandTextInputPrivate::sendInputPanelState(), QGridLayoutEngine::setGeometries(), stretchGradientToUserSpace(), QQuickTableViewPrivate::tableLayoutToString(), to_d2d_rect_f(), QQuickMultiEffectPrivate::updateCenterOffset(), QSGBasicInternalImageNode::updateGeometry(), QSGBasicInternalImageNode::updateGeometry(), QQuickBorderImageMesh::updateGeometry(), QQuickImage::updatePaintNode(), QWaylandQuickItem::updatePaintNode(), QGfxSourceProxy::updatePolish(), QGeoMapMapboxGLPrivate::updateSceneGraph(), QQuickMultiEffectPrivate::updateSourcePadding(), and QSGRhiShaderEffectMaterialShader::updateUniformData().
|
inlineconstexprnoexcept |
Returns the y-coordinate of the rectangle's top edge.
Equivalent to top().
Definition at line 658 of file qrect.h.
Referenced by QQuickTextNodeEngine::addTextBlock(), alignedRect(), alignedRect(), QQuickTableViewPrivate::calculateTopLeft(), QQuickTableViewPrivate::canUnloadTableEdge(), QGridLayoutEngine::cellRect(), QQuickTableViewPrivate::checkForVisibilityChanges(), QQuickTableViewPrivate::clampedCellAtPos(), QGeoMapPrivate::clampVisibleArea(), QPainter::PixmapFragment::create(), QTextLayout::draw(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QX11PaintEngine::drawImage(), QPaintEngine::drawImage(), QCoreGraphicsPaintEngine::drawImage(), QRasterPaintEngine::drawImage(), QPdfEngine::drawImage(), QPainter::drawImage(), QPainter::drawPath(), QCoreGraphicsPaintEngine::drawPixmap(), QX11PaintEngine::drawPixmap(), QPdfEngine::drawPixmap(), QPainter::drawPixmap(), QPaintEngine::drawRects(), QPainter::drawRects(), QPdfEngine::drawRects(), QX11PaintEngine::drawRects(), QOutlineMapper::endOutline(), QQuickTextAreaPrivate::ensureCursorVisible(), QBlitterPaintEngine::fillRect(), QBlitterPaintEnginePrivate::fillRect(), QQuickItem::geometryChange(), QQuickMouseArea::geometryChange(), QQuickTableViewPrivate::getAlignmentContentY(), QQuickTableViewPrivate::getEffectiveRowY(), QSGDistanceFieldGlyphCache::glyphMetrics(), QQuickListViewPrivate::itemGeometryChanged(), QLabelPrivate::layoutRect(), QSGSoftwareInternalImageNode::paint(), QLabel::paintEvent(), qDrawBorder(), QSGOpenVGHelpers::qDrawBorderImage(), QSGOpenVGHelpers::qDrawSubImage(), QSGOpenVGHelpers::qDrawTiled(), qt_drawImage(), qt_mac_create_imagemask(), qt_painterpath_isect_curve(), qt_scale_image_argb32_on_argb32(), qt_scale_image_argb32_on_rgb16(), qt_scale_image_rgb16_on_rgb16(), qt_scale_image_rgb32_on_rgb32(), QQuickTableViewPrivate::relayoutTableItems(), QSGOpenVGInternalImageNode::render(), QSGOpenVGRectangleNode::render(), QSGOpenVGImageNode::render(), QSGOpenVGSpriteNode::render(), QQuickTableViewPrivate::scheduleRebuildIfFastFlick(), QQuickTableViewPrivate::scrollTowardsSelectionPoint(), QWaylandTextInputPrivate::sendInputPanelState(), QGridLayoutEngine::setGeometries(), stretchGradientToUserSpace(), QQuickMaterialProgressBarNode::sync(), QQuickTableViewPrivate::tableLayoutToString(), to_d2d_rect_f(), QQuickMultiEffectPrivate::updateCenterOffset(), QSGBasicInternalImageNode::updateGeometry(), QSGBasicInternalImageNode::updateGeometry(), QQuickBorderImageMesh::updateGeometry(), QQuickImage::updatePaintNode(), QWaylandQuickItem::updatePaintNode(), QGfxSourceProxy::updatePolish(), QGeoMapMapboxGLPrivate::updateSceneGraph(), QQuickMultiEffectPrivate::updateSourcePadding(), and QSGRhiShaderEffectMaterialShader::updateUniformData().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns the lhs rectangle grown by the rhs margins.
|
related |
Returns true
if the rectangles r1 and r2 are approximately equal, otherwise returns false
.
|
related |