![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtCore\reentrant More...
#include <qpoint.h>
Public Member Functions | |
constexpr | QPointF () noexcept |
Constructs a null point, i.e. | |
constexpr | QPointF (const QPoint &p) noexcept |
Constructs a copy of the given point. | |
constexpr | QPointF (qreal xpos, qreal ypos) noexcept |
Constructs a point with the given coordinates (xpos, ypos). | |
constexpr qreal | manhattanLength () const |
bool | isNull () const noexcept |
Returns true if both the x and y coordinates are set to 0.0 (ignoring the sign); otherwise returns false . | |
constexpr qreal | x () const noexcept |
Returns the x coordinate of this point. | |
constexpr qreal | y () const noexcept |
Returns the y coordinate of this point. | |
constexpr void | setX (qreal x) noexcept |
Sets the x coordinate of this point to the given finite x coordinate. | |
constexpr void | setY (qreal y) noexcept |
Sets the y coordinate of this point to the given finite y coordinate. | |
constexpr QPointF | transposed () const noexcept |
constexpr qreal & | rx () noexcept |
Returns a reference to the x coordinate of this point. | |
constexpr qreal & | ry () noexcept |
Returns a reference to the y coordinate of this point. | |
constexpr QPointF & | operator+= (const QPointF &p) |
Adds the given point to this point and returns a reference to this point. | |
constexpr QPointF & | operator-= (const QPointF &p) |
Subtracts the given point from this point and returns a reference to this point. | |
constexpr QPointF & | operator*= (qreal c) |
Multiplies this point's coordinates by the given finite factor, and returns a reference to this point. | |
constexpr QPointF & | operator/= (qreal c) |
Divides both x and y by the given divisor, and returns a reference to this point. | |
constexpr QPoint | toPoint () const |
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rounded coordinates. | |
Static Public Member Functions | |
static constexpr qreal | dotProduct (const QPointF &p1, const QPointF &p2) |
Friends | |
class | QTransform |
QT_WARNING_PUSH QT_WARNING_DISABLE_FLOAT_COMPARE friend constexpr bool | operator== (const QPointF &p1, const QPointF &p2) |
Returns true if p1 is approximately equal to p2; otherwise returns false . | |
constexpr bool | operator!= (const QPointF &p1, const QPointF &p2) |
Returns true if p1 is sufficiently different from p2; otherwise returns false . | |
QT_WARNING_POP friend constexpr QPointF | operator+ (const QPointF &p1, const QPointF &p2) |
Returns a QPointF object that is the sum of the given points, p1 and p2; each component is added separately. | |
constexpr QPointF | operator- (const QPointF &p1, const QPointF &p2) |
Returns a QPointF object that is formed by subtracting p2 from p1; each component is subtracted separately. | |
constexpr QPointF | operator* (const QPointF &p, qreal c) |
Returns a copy of the given point, multiplied by the given finite factor. | |
constexpr QPointF | operator* (qreal c, const QPointF &p) |
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 given point, multiplied by the given finite factor. | |
constexpr QPointF | operator+ (const QPointF &p) |
constexpr QPointF | operator- (const QPointF &p) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QPointF object that is formed by changing the sign of each component of the given point. | |
constexpr QPointF | operator/ (const QPointF &p, qreal divisor) |
Returns the QPointF object formed by dividing each component of the given point by the given divisor. | |
template<std::size_t I, typename P , std::enable_if_t<(I< 2), bool > = true, std::enable_if_t< std::is_same_v< q20::remove_cvref_t< P >, QPointF >, bool > = true> | |
constexpr decltype(auto) | get (P &&p) noexcept |
Related Symbols | |
(Note that these are not member symbols.) | |
QDataStream & | operator<< (QDataStream &stream, const QPointF &point) |
Writes the given point to the given stream and returns a reference to the stream. | |
QDataStream & | operator>> (QDataStream &stream, QPointF &point) |
Reads a point from the given stream into the given point and returns a reference to the stream. | |
\inmodule QtCore
\reentrant
The QPointF class defines a point in the plane using floating point precision.
A point is specified by a x coordinate and an y coordinate which can be accessed using the x() and y() functions. The coordinates of the point are specified using finite floating point numbers for accuracy. The isNull() function returns true
if both x and y are set to 0.0. The coordinates can be set (or altered) using the setX() and setY() functions, or alternatively the rx() and ry() functions which return references to the coordinates (allowing direct manipulation).
Given a point p, the following statements are all equivalent:
A QPointF object can also be used as a vector: Addition and subtraction are defined as for vectors (each component is added separately). A QPointF object can also be divided or multiplied by an int
or a qreal
.
In addition, the QPointF class provides a constructor converting a QPoint object into a QPointF object, and a corresponding toPoint() function which returns a QPoint copy of this point. Finally, QPointF objects can be streamed as well as compared.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Constructs a copy of the given point.
Returns the dot product of p1 and p2.
Definition at line 239 of file qpoint.h.
Referenced by QQuickContext2D::addArcTo(), QStroker::joinPoints(), qt_scoreQuadratic(), and qt_toQuadratics().
|
inlinenoexcept |
Returns true
if both the x and y coordinates are set to 0.0 (ignoring the sign); otherwise returns false
.
Definition at line 328 of file qpoint.h.
References qIsNull().
Referenced by QGraphicsItemGroup::addToGroup(), QWindowsDirect2DPaintEnginePrivate::applyBrushOrigin(), QGraphicsItemPrivate::childrenBoundingRectHelper(), QGraphicsItemPrivate::combineTransformToParent(), QQuickDeliveryAgentPrivate::deliverTouchAsMouse(), QSvgUse::draw(), QQuickDeliveryAgentPrivate::flushFrameSynchronousEvents(), QQuickDeliveryAgentPrivate::handleMouseEvent(), QQuickDrawerPrivate::handleRelease(), QPdfDocumentPrivate::hitTest(), QLineEdit::inputMethodQuery(), QWidgetTextControl::inputMethodQuery(), QWindowsDirect2DPaintEnginePrivate::negateCurrentBrushOrigin(), QQuickDragHandler::onGrabChanged(), QSGTextMaskMaterial::populate(), printPage(), qt_convertPoint(), QGraphicsItemGroup::removeFromGroup(), QSGDistanceFieldGlyphNode::updateGeometry(), and QGraphicsItemPrivate::updateSceneTransformFromParent().
|
inlineconstexpr |
Returns the sum of the absolute values of x() and y(), traditionally known as the "Manhattan length" of the vector from the origin to the point.
Definition at line 323 of file qpoint.h.
References qAbs(), x(), and y().
Referenced by QQuickTextInput::mousePressEvent(), and QScrollerPrivate::moveWhilePressed().
|
inlineconstexprnoexcept |
Returns a reference to the x coordinate of this point.
Using a reference makes it possible to directly manipulate x. For example:
Definition at line 353 of file qpoint.h.
Referenced by QQuickSelectionRectanglePrivate::QQuickSelectionRectanglePrivate(), QQuickTextPrivate::anchorAt(), QQuickTableViewPrivate::calculateTopLeft(), QQuickTableViewPrivate::clampedCellAtPos(), QPlainTextEdit::event(), QGraphicsViewPrivate::mapToScene(), QScroller::pixelPerMeter(), qClipLine(), QLineF::setAngle(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QMacStyle::subControlRect(), QQuickTableViewPrivate::updateExtents(), QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(), and QGraphicsWidgetPrivate::windowFrameMouseReleaseEvent().
|
inlineconstexprnoexcept |
Returns a reference to the y coordinate of this point.
Using a reference makes it possible to directly manipulate y. For example:
Definition at line 358 of file qpoint.h.
Referenced by QQuickSelectionRectanglePrivate::QQuickSelectionRectanglePrivate(), QQuickTextPrivate::anchorAt(), QCommonStylePrivate::calculateElidedText(), QQC2::QCommonStylePrivate::calculateElidedText(), QQuickTableViewPrivate::calculateTopLeft(), QQuickTableViewPrivate::clampedCellAtPos(), QScroller::pixelPerMeter(), qClipLine(), QRasterizer::rasterizeLine(), QLineF::setAngle(), QQuickTableViewPrivate::updateExtents(), QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(), and QGraphicsWidgetPrivate::windowFrameMouseReleaseEvent().
Sets the x coordinate of this point to the given finite x coordinate.
Definition at line 343 of file qpoint.h.
Referenced by QScroller::ensureVisible(), QQuickItemViewTransitionJob::finished(), QScrollerPrivate::handleDrag(), QPdfDocumentPrivate::hitTest(), QQuickMouseArea::mouseMoveEvent(), operator>>(), QEdidParser::parse(), QScrollerPrivate::releaseWhileDragging(), QScroller::scrollTo(), QQuickShapeRadialGradient::setCenterX(), QQuickShapeConicalGradient::setCenterX(), QScrollerPrivate::setContentPositionHelperDragging(), QScrollerPrivate::setContentPositionHelperScrolling(), QQuickShapeRadialGradient::setFocalX(), QQuickShapeLinearGradient::setX1(), QQuickShapeLinearGradient::setX2(), QScroller::stop(), QtWaylandClient::QWaylandTouchExtension::touch_extension_touch(), QScrollerPrivate::updateVelocity(), and QScroller::velocity().
Sets the y coordinate of this point to the given finite y coordinate.
Definition at line 348 of file qpoint.h.
Referenced by QScroller::ensureVisible(), QQuickItemViewTransitionJob::finished(), QScrollerPrivate::handleDrag(), QQuickMouseArea::mouseMoveEvent(), operator>>(), QEdidParser::parse(), QScrollerPrivate::releaseWhileDragging(), QScroller::scrollTo(), QQuickShapeRadialGradient::setCenterY(), QQuickShapeConicalGradient::setCenterY(), QScrollerPrivate::setContentPositionHelperDragging(), QScrollerPrivate::setContentPositionHelperScrolling(), QQuickShapeRadialGradient::setFocalY(), QQuickShapeLinearGradient::setY1(), QQuickShapeLinearGradient::setY2(), QScroller::stop(), QtWaylandClient::QWaylandTouchExtension::touch_extension_touch(), QScrollerPrivate::updateVelocity(), and QScroller::velocity().
|
inlineconstexpr |
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rounded coordinates.
Definition at line 394 of file qpoint.h.
References qRound().
Referenced by QGraphicsViewPrivate::_q_unsetViewportCursor(), QPainter::brushOrigin(), QGraphicsProxyWidget::contextMenuEvent(), QQuickDragAttachedPrivate::deliverEnterEvent(), QQuickDragAttachedPrivate::deliverMoveEvent(), QWindowsVistaStylePrivate::drawBackgroundDirectly(), QQC2::QWindowsXPStylePrivate::drawBackgroundDirectly(), QTextDocumentLayoutPrivate::drawFrame(), QItemDelegate::editorEvent(), QStyledItemDelegate::editorEvent(), QTabBar::event(), QHeaderView::event(), QTipLabel::eventFilter(), QWhatsThisPrivate::eventFilter(), QMdiSubWindow::eventFilter(), QCocoaWindow::geometry(), QAndroidPlatformScreen::grabWindow(), QCocoaScreen::grabWindow(), QWidgetWindow::handleEnterLeaveEvent(), QtWaylandClient::QWaylandInputDevice::handleTouchPoint(), QGraphicsTextItem::inputMethodQuery(), QGraphicsProxyWidget::inputMethodQuery(), QQuickVisualTestUtils::mapCenterToWindow(), QWidget::mapFrom(), QWidget::mapFromGlobal(), QGraphicsView::mapFromScene(), QWidget::mapTo(), QWidget::mapToGlobal(), QQuickVisualTestUtils::mapToWindow(), QtQuickTest::mouseEvent(), QMenuPrivate::mouseEventTaken(), QWidgetTextControlPrivate::mouseMoveEvent(), QSlider::mouseMoveEvent(), QMdiSubWindow::mouseMoveEvent(), QSystemTrayIconSys::mousePressEvent(), QSlider::mousePressEvent(), QMdiSubWindow::mousePressEvent(), QMdiSubWindow::mouseReleaseEvent(), QApplication::notify(), QQuickPointerHandler::parentContains(), QtWaylandClient::QWaylandInputDevice::FrameData::pixelDelta(), QGraphicsEffectSource::pixmap(), QCocoaCursor::pos(), QHighDpi::position(), PressDelayHandler::pressed(), QWidgetTextControl::processEvent(), QGuiApplicationPrivate::processMouseEvent(), QGuiApplicationPrivate::processWheelEvent(), QSwipeGestureRecognizer::recognize(), QTapAndHoldGestureRecognizer::recognize(), QFlickGestureRecognizer::recognize(), QGraphicsScenePrivate::sendTouchBeginEvent(), QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(), QtWaylandClient::QWaylandXdgSurface::showWindowMenu(), QQuickDragAttachedPrivate::startDrag(), QGuiApplicationPrivate::QLastCursorPosition::toPoint(), QtWaylandClient::QWaylandTouchExtension::touch_extension_touch(), QtAndroidInput::touchCancel(), QtAndroidInput::touchEnd(), QWindowsTabletSupport::translateTabletPacketEvent(), QTreeView::viewportEvent(), QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(), QGraphicsWidgetPrivate::windowFrameMouseReleaseEvent(), and QtWaylandClient::QWaylandTabletToolV2::zwp_tablet_tool_v2_frame().
|
inlineconstexprnoexcept |
Returns a point with x and y coordinates exchanged:
|
inlineconstexprnoexcept |
Returns the x coordinate of this point.
Definition at line 333 of file qpoint.h.
Referenced by QConicalGradient::QConicalGradient(), QLinearGradient::QLinearGradient(), QPainterPath::QPainterPath(), QRadialGradient::QRadialGradient(), QRadialGradient::QRadialGradient(), QRadialGradient::QRadialGradient(), QQuickContext2D::addArcTo(), QFreetypeFace::addBitmapToPath(), QPdfEnginePrivate::addBrushPattern(), addCircle(), addLineTo(), QOpenGL2PEXVertexArray::addPath(), QPainterPath::addText(), QGraphicsItemGroup::addToGroup(), QQuickPathQuad::addToPath(), QQuickPathCubic::addToPath(), QQuickPathCatmullRomCurve::addToPath(), QQuickPathArc::addToPath(), QQuickItemPrivate::adjustedPosForTransform(), QQuickAttractorAffector::affectParticle(), QQuickTurbulenceAffector::affectSystem(), QDeclarativeGeoMap::alignCoordinateToPoint(), QQuickTextPrivate::anchorAt(), QQuickMaterialRipple::anchorPoint(), QLineF::angle(), QWindowsDirect2DPaintEnginePrivate::applyBrushOrigin(), QRasterPaintEnginePrivate::blitImage(), QPolygonF::boundingRect(), QQuickTableViewPrivate::calculateTopLeft(), QGraphicsView::centerOn(), QQuickShapeRadialGradient::centerX(), QQuickShapeConicalGradient::centerX(), QQuickTableViewPrivate::checkForVisibilityChanges(), QQuickDialPrivate::circularPositionAt(), QQuickTableViewPrivate::clampedCellAtPos(), QGraphicsItemPrivate::combineTransformFromParent(), QGraphicsItemPrivate::combineTransformToParent(), QQuickImageParticle::commit(), QQuickShapeCurveMaterial::compare(), QQuickShapeLinearGradientMaterial::compare(), QQuickShapeRadialGradientMaterial::compare(), QQuickShapeConicalGradientMaterial::compare(), component(), QWaylandQtShellChromePrivate::constrainPoint(), QQuickItem::contains(), QQuickEllipseExtruder::contains(), QQuickMaskExtruder::contains(), convertCGPathToQPainterPath(), QGeoCameraTilesPrivate::createFrustum(), QQuickPath::createPath(), QScrollerPrivate::createScrollingSegments(), QScrollerPrivate::createScrollingSegments(), QScrollerPrivate::createScrollToSegments(), QQuickPath::createShapePath(), QPainterPath::cubicTo(), QOutlineMapper::curveTo(), QGraphicsItem::deviceTransform(), QApplicationPrivate::dispatchEnterLeave(), QQuickParentChangePrivate::doChange(), QQuickFlickablePrivate::drag(), QQuickPointerHandlerPrivate::dragOverThreshold(), draw_text_item_win(), QTextLayout::drawCursor(), QQC2::QStyleHelper::drawDial(), QTextDocumentLayoutPrivate::drawFrame(), QRasterPaintEngine::drawImage(), QRasterPaintEnginePrivate::drawImage(), QCosmeticStroker::drawPath(), QCoreGraphicsPaintEnginePrivate::drawPath(), QWin32PrintEngine::drawPixmap(), QX11PaintEngine::drawPoints(), QSvgPaintEngine::drawPolygon(), QPainter::drawStaticText(), QSvgPaintEngine::drawTextItem(), QRasterPaintEngine::drawTiledPixmap(), QQuickParticleEmitter::emitWindow(), QQuickTrailEmitter::emitWindow(), QPlainTextEdit::event(), QWidgetTextControlPrivate::extendWordwiseSelection(), QQuickTextControlPrivate::extendWordwiseSelection(), QSvgText::fastBounds(), QX11PaintEnginePrivate::fillPolygon_dev(), QApplicationPrivate::findClosestTouchPointTarget(), QQuickShapeRadialGradient::focalX(), QBezier::fromPoints(), QFontEngine::getGlyphPositions(), good_offset(), QQuickDrawerPrivate::grabMouse(), QScrollerPrivate::handleDrag(), QQuickTableViewHoverHandler::handleEventPoint(), QtWaylandClient::QWaylandBradientDecoration::handleMouse(), QQuickPathViewPrivate::handleMouseMoveEvent(), QWaylandMouseTrackerPrivate::handleMousePos(), QQuickPathViewPrivate::handleMousePressEvent(), QQuickSwipeDelegatePrivate::handleMouseReleaseEvent(), QQuickDragHandler::handlePointerEventImpl(), QQuickPinchHandler::handlePointerEventImpl(), QQuickSplitViewPrivate::handlePress(), QQuickScrollBarPrivate::handleRelease(), QQuickDrawerPrivate::handleRelease(), QQuickFlickablePrivate::handleReleaseEvent(), QtWaylandClient::QWaylandBradientDecoration::handleTouch(), QTextDocumentLayout::hitTest(), QPdfDocumentPrivate::hitTest(), BezierEase::init(), QTriangulator< T >::initialize(), QLineEdit::inputMethodQuery(), QtPrivate::intersect_point(), QColorVector::isValidChromaticity(), QQuickPageIndicatorPrivate::itemAt(), QQuickFlickablePrivate::itemGeometryChanged(), QQuickItemPrivate::itemToParentTransform(), QGraphicsItem::itemTransform(), QQuickItemViewTransitionableItem::itemX(), QStroker::joinPoints(), QQuickSplitViewPrivate::layoutResizeSplitItems(), QQuickDialPrivate::linearPositionAt(), QOutlineMapper::lineTo(), QQuickTableViewPrivate::loadInitialTable(), manhattanLength(), QMatrix4x4::map(), QGraphicsItem::mapFromScene(), QtWaylandClient::QWaylandWindow::mapFromWlSurface(), QMatrix4x4::mapRect(), QDoubleMatrix4x4::mapRect(), QGraphicsItem::mapToScene(), QWaylandQuickItem::mapToSurface(), QQuickVisualTestUtils::mapToWindow(), marginsOffset(), QBezier::midTangent(), QWidgetTextControlPrivate::mouseMoveEvent(), QGraphicsItem::mouseMoveEvent(), QQuickPressHandler::mouseMoveEvent(), QQuickMouseArea::mouseMoveEvent(), QQuickSwitch::mouseMoveEvent(), QQuickSwitchDelegate::mouseMoveEvent(), QQuickTextControlPrivate::mouseMoveEvent(), QQuickPressHandler::mousePressEvent(), QQuickPressHandler::mouseReleaseEvent(), QOutlineMapper::moveTo(), QScrollerPrivate::moveWhilePressed(), QWindowsDirect2DPaintEnginePrivate::negateCurrentBrushOrigin(), QSubpathFlatIterator::next(), QKdPointFinder::operator()(), operator<<(), QtWaylandClient::QWaylandBradientDecoration::paint(), QmlJSDebugger::SelectionHighlight::paint(), QQuickFusionDial::paint(), QQuickMaterialTextContainer::paint(), QVideoFrame::paint(), QQuickSvgParser::parsePathDataFast(), parsePathDataFast(), QQuickPathViewPrivate::pointNear(), pointOnEdge(), QSGTextMaskMaterial::populate(), QGraphicsItemAnimation::posAt(), QQuickDrawerPrivate::positionAt(), QQuickScrollBarPrivate::positionAt(), QQuickSliderPrivate::positionAt(), QQuickSwitchPrivate::positionAt(), QQuickSwitchDelegatePrivate::positionAt(), QQuickTextInputPrivate::positionAt(), positionAt(), positionForCurve(), QtWayland::TouchExtensionGlobal::postTouchEvent(), QQuickItemParticle::prepareNextFrame(), QScrollerPrivate::prepareScrolling(), QQuickItemViewTransitionableItem::prepareTransition(), printPage(), QDashedStrokeProcessor::process(), QQuickTextControl::processEvent(), QWidgetTextControl::processEvent(), QGuiApplicationPrivate::processMouseEvent(), QSGOpenVGHelpers::qDrawSubImage(), qgeotiledmapscene_isTileInViewport_rotationTilt(), QSGOpenVGHelpers::qPainterPathToVGPath(), qt_convertPoint(), qt_draw_decoration_for_glyphs(), qt_getInflectionPoints(), qt_isExtendedRadialGradient(), qt_mac_compose_path(), qt_painterpath_check_crossing(), qt_painterpath_isect_curve(), qt_quadraticForCubic(), qt_stroke_side(), QPainterPath::quadTo(), QGeoProjectionWebMercator::quickItemTransformation(), QRasterizer::rasterizeLine(), QMacPanGestureRecognizer::recognize(), QSwipeGestureRecognizer::recognize(), QWidgetTextControlPrivate::rectForPosition(), QQuickTextControlPrivate::rectForPosition(), QScrollerPrivate::releaseWhileDragging(), QGraphicsItemGroup::removeFromGroup(), QSGOpenVGRectangleNode::render(), QEvdevTouchScreenData::reportPoints(), QQuickPopupPositioner::reposition(), QQuickTargetDirection::sample(), QSvgPaintEngine::saveLinearGradientBrush(), QSvgPaintEngine::saveRadialGradientBrush(), QScrollerPrivate::scrollingSegmentsEndPos(), QScroller::scrollTo(), QLineF::setAngle(), QRadialGradient::setCenter(), QConicalGradient::setCenter(), QQuickShapeRadialGradient::setCenterX(), QQuickShapeConicalGradient::setCenterX(), QScrollerPrivate::setContentPositionHelperDragging(), QScrollerPrivate::setContentPositionHelperScrolling(), QPrintPreviewWidgetPrivate::setCurrentPage(), QQnxCamera::setCustomFocusPoint(), QAVFCameraBase::setCustomFocusPoint(), QCoreGraphicsPaintEnginePrivate::setFillBrush(), QLinearGradient::setFinalStop(), QQuickShapeRadialGradient::setFocalX(), QSGOpenVGGlyphNode::setGlyphs(), QSGDistanceFieldGlyphCache::setGlyphsPosition(), QQuickAbstractButtonPrivate::setMovePoint(), QQuickPinchHandler::setPersistentTranslation(), QGraphicsItemPrivate::setPosHelper(), QQuickMouseEvent::setPosition(), QGraphicsItem::setTransformOriginPoint(), QOpenGLShaderProgram::setUniformValue(), QSpanData::setup(), QGeoTiledMapScenePrivate::setupCamera(), QQuickShapeLinearGradient::setX1(), QQuickShapeLinearGradient::setX2(), QGraphicsItem::setY(), shift(), QQuickParticleAffector::shouldAffect(), QComboBox::showPopup(), QWaylandXdgToplevel::sizeForResize(), QWaylandWlShellSurface::sizeForResize(), QOpenGLTextureBlitter::sourceTransform(), sourceTransform(), splitPolygon(), QQuickItemViewTransitionJob::startTransition(), QScroller::stop(), QPaintEngineEx::stroke(), QStrokerOps::strokePath(), QStrokerOps::strokePolygon(), QOpenGLTextureBlitter::targetTransform(), targetTransform(), tcbToBezier(), QTessellator::tessellateRect(), QQuickPressHandler::timerEvent(), to_d2d_point_2f(), QGuiApplicationPrivate::QLastCursorPosition::toPoint(), QPdfLink::toString(), QQuickParentAnimation::transition(), QWindowsMouseHandler::translateTouchEvent(), QLineF::unitVector(), QX11PaintEngine::updateBrush(), QOpenGL2PaintEngineExPrivate::updateBrushUniforms(), QQuickMaterialRippleWaveNode::updateCurrentTime(), QWaylandQtShellChromePrivate::updateDecorationInteraction(), QQuickWindowPrivate::updateDirtyNode(), QQuickTableViewResizeHandler::updateDrag(), QQuickTableViewPrivate::updateExtents(), QSGDistanceFieldGlyphNode::updateGeometry(), QQuickPathViewPrivate::updateItem(), updateNodeTransform(), QQuickTextEdit::updatePaintNode(), QGraphicsItemPrivate::updateSceneTransformFromParent(), QQuickFlipablePrivate::updateSide(), QQuickTableViewResizeHandler::updateState(), QQuickMultiPointTouchArea::updateTouchData(), DistanceFieldShiftedStyleTextMaterialRhiShader::updateUniformData(), QQuickShapeLinearGradientRhiShader::updateUniformData(), QQuickShapeRadialGradientRhiShader::updateUniformData(), QQuickShapeConicalGradientRhiShader::updateUniformData(), QScrollerPrivate::updateVelocity(), QGraphicsWidgetPrivate::windowFrameMouseMoveEvent(), QGraphicsWidget::windowFrameSectionAt(), QQuickDropAreaDrag::x(), QQuickShapeLinearGradient::x1(), and QQuickShapeLinearGradient::x2().
|
inlineconstexprnoexcept |
Returns the y coordinate of this point.
Definition at line 338 of file qpoint.h.
Referenced by QConicalGradient::QConicalGradient(), QLinearGradient::QLinearGradient(), QPainterPath::QPainterPath(), QRadialGradient::QRadialGradient(), QRadialGradient::QRadialGradient(), QRadialGradient::QRadialGradient(), QQuickContext2D::addArcTo(), QFreetypeFace::addBitmapToPath(), QPdfEnginePrivate::addBrushPattern(), addCircle(), addLineTo(), QOpenGL2PEXVertexArray::addPath(), QPainterPath::addText(), QGraphicsItemGroup::addToGroup(), QQuickPathQuad::addToPath(), QQuickPathCubic::addToPath(), QQuickPathCatmullRomCurve::addToPath(), QQuickPathArc::addToPath(), QQuickItemPrivate::adjustedPosForTransform(), QQuickAttractorAffector::affectParticle(), QQuickTurbulenceAffector::affectSystem(), QDeclarativeGeoMap::alignCoordinateToPoint(), QQuickMaterialRipple::anchorPoint(), QLineF::angle(), QWindowsDirect2DPaintEnginePrivate::applyBrushOrigin(), QRasterPaintEnginePrivate::blitImage(), QPolygonF::boundingRect(), QQuickTableViewPrivate::calculateTopLeft(), QGraphicsView::centerOn(), QQuickShapeRadialGradient::centerY(), QQuickShapeConicalGradient::centerY(), QQuickTableViewPrivate::checkForVisibilityChanges(), QQuickDialPrivate::circularPositionAt(), QQuickTableViewPrivate::clampedCellAtPos(), QGraphicsItemPrivate::combineTransformFromParent(), QGraphicsItemPrivate::combineTransformToParent(), QQuickImageParticle::commit(), QQuickShapeCurveMaterial::compare(), QQuickShapeLinearGradientMaterial::compare(), QQuickShapeRadialGradientMaterial::compare(), QQuickShapeConicalGradientMaterial::compare(), component(), QWaylandQtShellChromePrivate::constrainPoint(), QQuickItem::contains(), QQuickEllipseExtruder::contains(), QQuickMaskExtruder::contains(), convertCGPathToQPainterPath(), QGeoCameraTilesPrivate::createFrustum(), QQuickPath::createPath(), QScrollerPrivate::createScrollingSegments(), QScrollerPrivate::createScrollingSegments(), QScrollerPrivate::createScrollToSegments(), QQuickPath::createShapePath(), QPainterPath::cubicTo(), QOutlineMapper::curveTo(), QGraphicsItem::deviceTransform(), QQuickParentChangePrivate::doChange(), QQuickFlickablePrivate::drag(), QQuickPointerHandlerPrivate::dragOverThreshold(), QTextLayout::draw(), draw_text_item_win(), QTextLayout::drawCursor(), QQC2::QStyleHelper::drawDial(), QTextDocumentLayoutPrivate::drawFrame(), QRasterPaintEngine::drawImage(), QRasterPaintEnginePrivate::drawImage(), QCosmeticStroker::drawPath(), QCoreGraphicsPaintEnginePrivate::drawPath(), QWin32PrintEngine::drawPixmap(), QX11PaintEngine::drawPoints(), QSvgPaintEngine::drawPolygon(), QPainter::drawStaticText(), QSvgPaintEngine::drawTextItem(), QRasterPaintEngine::drawTiledPixmap(), QQuickParticleEmitter::emitWindow(), QQuickTrailEmitter::emitWindow(), QPixmapStyle::eventFilter(), QSvgText::fastBounds(), QX11PaintEnginePrivate::fillPolygon_dev(), QApplicationPrivate::findClosestTouchPointTarget(), QQuickShapeRadialGradient::focalY(), QBezier::fromPoints(), QFontEngine::getGlyphPositions(), good_offset(), QQuickDrawerPrivate::grabMouse(), QScrollerPrivate::handleDrag(), QQuickTableViewHoverHandler::handleEventPoint(), QtWaylandClient::QWaylandBradientDecoration::handleMouse(), QQuickPathViewPrivate::handleMouseMoveEvent(), QWaylandMouseTrackerPrivate::handleMousePos(), QQuickPathViewPrivate::handleMousePressEvent(), QQuickDragHandler::handlePointerEventImpl(), QQuickPinchHandler::handlePointerEventImpl(), QQuickSplitViewPrivate::handlePress(), QQuickScrollBarPrivate::handleRelease(), QQuickDrawerPrivate::handleRelease(), QQuickFlickablePrivate::handleReleaseEvent(), QtWaylandClient::QWaylandBradientDecoration::handleTouch(), QTextDocumentLayout::hitTest(), QPlainTextEditControl::hitTest(), BezierEase::init(), QTriangulator< T >::initialize(), QLineEdit::inputMethodQuery(), QtPrivate::intersect_point(), QLineF::intersects(), QColorVector::isValidChromaticity(), QQuickPageIndicatorPrivate::itemAt(), QQuickFlickablePrivate::itemGeometryChanged(), QQuickItemPrivate::itemToParentTransform(), QGraphicsItem::itemTransform(), QQuickItemViewTransitionableItem::itemY(), QStroker::joinPoints(), QTextDocumentLayoutPrivate::layoutBlock(), QQuickSplitViewPrivate::layoutResizeSplitItems(), QQuickDialPrivate::linearPositionAt(), QOutlineMapper::lineTo(), QQuickTableViewPrivate::loadInitialTable(), manhattanLength(), QMatrix4x4::map(), QGraphicsItem::mapFromScene(), QtWaylandClient::QWaylandWindow::mapFromWlSurface(), QMatrix4x4::mapRect(), QDoubleMatrix4x4::mapRect(), QGraphicsItem::mapToScene(), QWaylandQuickItem::mapToSurface(), QQuickVisualTestUtils::mapToWindow(), marginsOffset(), QGeoProjectionWebMercator::maximumCenterLatitudeAtZoom(), QBezier::midTangent(), QGeoProjectionWebMercator::minimumCenterLatitudeAtZoom(), QGraphicsItem::mouseMoveEvent(), QQuickMouseArea::mouseMoveEvent(), QQuickPressHandler::mousePressEvent(), QQuickPressHandler::mouseReleaseEvent(), QOutlineMapper::moveTo(), QScrollerPrivate::moveWhilePressed(), QWindowsDirect2DPaintEnginePrivate::negateCurrentBrushOrigin(), QSubpathFlatIterator::next(), QKdPointFinder::operator()(), operator<<(), QtWaylandClient::QWaylandBradientDecoration::paint(), QmlJSDebugger::SelectionHighlight::paint(), QQuickFusionDial::paint(), QQuickMaterialTextContainer::paint(), QVideoFrame::paint(), QQuickSvgParser::parsePathDataFast(), parsePathDataFast(), QQuickPathViewPrivate::pointNear(), pointOnEdge(), QSGTextMaskMaterial::populate(), QMenuPrivate::popup(), QGraphicsItemAnimation::posAt(), QQuickDrawerPrivate::positionAt(), QQuickScrollBarPrivate::positionAt(), QQuickSliderPrivate::positionAt(), QQuickTextInputPrivate::positionAt(), positionAt(), positionForCurve(), QtWayland::TouchExtensionGlobal::postTouchEvent(), QQuickItemParticle::prepareNextFrame(), QScrollerPrivate::prepareScrolling(), QQuickItemViewTransitionableItem::prepareTransition(), printPage(), QDashedStrokeProcessor::process(), QQuickTextControl::processEvent(), QWidgetTextControl::processEvent(), QMenuSloppyState::processMouseEvent(), QGuiApplicationPrivate::processMouseEvent(), QSGOpenVGHelpers::qDrawSubImage(), qgeotiledmapscene_isTileInViewport_rotationTilt(), QSGOpenVGHelpers::qPainterPathToVGPath(), qt_convertPoint(), qt_getInflectionPoints(), qt_isExtendedRadialGradient(), qt_mac_compose_path(), qt_painterpath_check_crossing(), qt_painterpath_isect_curve(), qt_quadraticForCubic(), qt_stroke_side(), QPainterPath::quadTo(), QGeoProjectionWebMercator::quickItemTransformation(), QRasterizer::rasterizeLine(), QMacPanGestureRecognizer::recognize(), QSwipeGestureRecognizer::recognize(), QWidgetTextControlPrivate::rectForPosition(), QQuickTextControlPrivate::rectForPosition(), QScrollerPrivate::releaseWhileDragging(), QGraphicsItemGroup::removeFromGroup(), QVideoWindowPrivate::render(), QSGOpenVGRectangleNode::render(), QEvdevTouchScreenData::reportPoints(), QQuickPopupPositioner::reposition(), QQuickTargetDirection::sample(), QSvgPaintEngine::saveLinearGradientBrush(), QSvgPaintEngine::saveRadialGradientBrush(), QScrollerPrivate::scrollingSegmentsEndPos(), QScroller::scrollTo(), QLineF::setAngle(), QRadialGradient::setCenter(), QConicalGradient::setCenter(), QQuickShapeRadialGradient::setCenterY(), QQuickShapeConicalGradient::setCenterY(), QScrollerPrivate::setContentPositionHelperDragging(), QScrollerPrivate::setContentPositionHelperScrolling(), QPrintPreviewWidgetPrivate::setCurrentPage(), QQnxCamera::setCustomFocusPoint(), QAVFCameraBase::setCustomFocusPoint(), QCoreGraphicsPaintEnginePrivate::setFillBrush(), QLinearGradient::setFinalStop(), QQuickShapeRadialGradient::setFocalY(), QSGOpenVGGlyphNode::setGlyphs(), QSGDistanceFieldGlyphCache::setGlyphsPosition(), QQuickAbstractButtonPrivate::setMovePoint(), QQuickPinchHandler::setPersistentTranslation(), QGraphicsItemPrivate::setPosHelper(), QQuickMouseEvent::setPosition(), QGraphicsItem::setTransformOriginPoint(), QOpenGLShaderProgram::setUniformValue(), QSpanData::setup(), QGeoTiledMapScenePrivate::setupCamera(), QGraphicsItem::setX(), QQuickShapeLinearGradient::setY1(), QQuickShapeLinearGradient::setY2(), shift(), QQuickParticleAffector::shouldAffect(), QWaylandXdgToplevel::sizeForResize(), QWaylandWlShellSurface::sizeForResize(), QOpenGLTextureBlitter::sourceTransform(), sourceTransform(), splitPolygon(), QQuickItemViewTransitionJob::startTransition(), QScroller::stop(), QPaintEngineEx::stroke(), QStrokerOps::strokePath(), QStrokerOps::strokePolygon(), QOpenGLTextureBlitter::targetTransform(), targetTransform(), tcbToBezier(), QTessellator::tessellateRect(), QBezier::tForY(), QQuickPressHandler::timerEvent(), to_d2d_point_2f(), QPdfLink::toString(), QQuickParentAnimation::transition(), QWindowsMouseHandler::translateTouchEvent(), QLineF::unitVector(), QX11PaintEngine::updateBrush(), QOpenGL2PaintEngineExPrivate::updateBrushUniforms(), QQuickMaterialRippleWaveNode::updateCurrentTime(), QWaylandQtShellChromePrivate::updateDecorationInteraction(), QQuickWindowPrivate::updateDirtyNode(), QQuickTableViewResizeHandler::updateDrag(), QQuickTableViewPrivate::updateExtents(), QSGDistanceFieldGlyphNode::updateGeometry(), QQuickPathViewPrivate::updateItem(), updateNodeTransform(), QQuickTextEdit::updatePaintNode(), QGraphicsItemPrivate::updateSceneTransformFromParent(), QQuickFlipablePrivate::updateSide(), QQuickTextPrivate::updateSize(), QQuickTableViewResizeHandler::updateState(), QQuickMultiPointTouchArea::updateTouchData(), DistanceFieldShiftedStyleTextMaterialRhiShader::updateUniformData(), QQuickShapeLinearGradientRhiShader::updateUniformData(), QQuickShapeRadialGradientRhiShader::updateUniformData(), QQuickShapeConicalGradientRhiShader::updateUniformData(), QScrollerPrivate::updateVelocity(), QGraphicsWidgetPrivate::windowFrameMouseMoveEvent(), QGraphicsWidget::windowFrameSectionAt(), QQuickDropAreaDrag::y(), QQuickShapeLinearGradient::y1(), and QQuickShapeLinearGradient::y2().
|
friend |
Returns true
if p1 is sufficiently different from p2; otherwise returns false
.
Returns a copy of the given point, multiplied by the given finite factor.
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 given point, multiplied by the given finite factor.
Returns a QPointF object that is the sum of the given points, p1 and p2; each component is added separately.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QPointF object that is formed by changing the sign of each component of the given point.
Equivalent to {QPointF(0,0)
- point}.
Returns a QPointF object that is formed by subtracting p2 from p1; each component is subtracted separately.
Returns the QPointF object formed by dividing each component of the given point by the given divisor.
The divisor must not be zero or NaN.
|
related |
Writes the given point to the given stream and returns a reference to the stream.
Definition at line 767 of file qpoint.cpp.
Returns true
if p1 is approximately equal to p2; otherwise returns false
.
|
related |
Reads a point from the given stream into the given point and returns a reference to the stream.
Definition at line 783 of file qpoint.cpp.
|
friend |