Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 143635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:07:36+00:00 2026-05-11T08:07:36+00:00

I have a board as a canvas with several shapes drawn on it, some

  • 0

I have a board as a canvas with several shapes drawn on it, some of them are triangles, circles, rectangles but all are contained inside their own bound delimited rectangle.

‘The circle will be inside a rectangle’

I put two circles A, B on the board where A is over B and has some area colliding. If I click on A area corresponding to the container box but not the actual A circle shape area I wont select the A circle, however that would stop me from selecting B since my A container overlaps and is over B one.

In an event base framework, the child event will go to the parent not siblings I guess.

So my choice was to do a check for all shape container which have some area at point x ordered by z index. Then for each container check if the shape inside it collide.

It does not seem super efficient but is there any other ways?

--------- |    --------   |    |      | -----|      |      -------- 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T08:07:36+00:00Added an answer on May 11, 2026 at 8:07 am

    You’re handling it about as well as it can be handled – windowing systems generally obey Z order (layers).

    This will be better in the long run anyway, especially if you want to be able to select multiple items by drawing a selection box around them.

    There are algorithms for finding if rectangles overlap by converting them into 2d representations on both the x and y axis. You can do the same thing, and then compare your point to see which objects your point overlaps:

    Algorithm to detect intersection of two rectangles?

    Just treat your point selection (or rectangle selection if you draw a bounding box to select multiple items) as another rectangle to be compared as overlapping to the others.

    -Adam

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some C# experience, but im completly new to java. So i have
I have a message board, and I have some code that loads new messages
I have a canvas with several small canvases on it. Like this: public class
I have an Arduino board connected to my PC's serial port. The board sends
Using Bread::Board I have an object/service A with with accessor $A->foo . Object/service B
Thanks to this board I have managed to retrieve the name and the price
I have created a forum board app, based on YAML schema found in 'real
I have a SAM9 based board running embedded linux. I had a JFFS2 file
I have a ARM11 based hardware board which runs a Linux kernel ver. 2.6.21.5-cfs-v19.
I have the following function void initBoard(int * board[BOARD_ROWS][BOARD_COLS]){ int z = 0; for(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.