Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic find DiagramItems within a rectangle (Read 1692 times)
nsandhu
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Aug 22nd, 2011
find DiagramItems within a rectangle
Sep 1st, 2011 at 7:59pm
Print Post  
I would like to get a list of all DiagramItem(s) visible in the current view. I can get a rectangle of the current view by using deviceToDoc() and getVisibleRect() methods however I have not been able to find a getItems(Rectangle) method !

Is there another way to do this efficiently other than looping over all the items and filtering ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: find DiagramItems within a rectangle
Reply #1 - Sep 2nd, 2011 at 4:52am
Print Post  
You will have to loop over the items and call visibleRect.intersects(item.getBounds()) to find out which items are visible in the view.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint