Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Calculating areas between QGraphicsItems
Qt 6.11 is out! See what's new in the release blog

Calculating areas between QGraphicsItems

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 189 Views
  • 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.
  • X Offline
    X Offline
    xtingray
    wrote on last edited by xtingray
    #1

    Hi!

    Currently I am trying to implement a bucket tool to fill with color the areas generated by the intersection of several QGraphicItems. Let me describe a couple of examples of my requirement.

    Example 1: If I have three independent paths that form a shape like this:
    alt text
    Could it be possible to calculate the area created by them, so I can add fourth element with the yellow shape?

    Example 2: If I have two ellipses
    alt text
    Could it be possible to calculate the area generated by the intersection of both elements, so I can include a third element with the yellow form?

    I am guessing that I will have to implement several algorithms, one for every case. Any way, I just started my research about this topic, so any suggestion or reference related to this problem is very welcome!
    Thanks.


    Qt Developer

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved