Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Can we get get coordinates of intersection area of rectangles intersecting with a polygon with QPolygonF::intersect

    General and Desktop
    2
    4
    862
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Q
      Qt Enthusiast last edited by Qt Enthusiast

      hi Have
      QPolygonF p
      QRectF smallF

      the small rectangles smallF is partially inside the p

      Can we get get coordinates of intersection area of rectangles intersecting with a polygon with QPolygonF::intersect

      Any suggestions will help

      1 Reply Last reply Reply Quote 0
      • VRonin
        VRonin last edited by

        QPolygonF intersectPSmallF = p.intersected(QPolygonF(smallF));

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply Reply Quote 3
        • Q
          Qt Enthusiast last edited by

          if the intersected area is rectangle then how to get that

          1 Reply Last reply Reply Quote 0
          • VRonin
            VRonin last edited by

            http://doc.qt.io/qt-5/qpolygonf.html#boundingRect

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            1 Reply Last reply Reply Quote 3
            • First post
              Last post