Determine if a Shape is in the Drawing Area


Author
Message
Volvick Derose
Volvick Derose
Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)
Group: Forum Members
Posts: 71, Visits: 1
Assume that some shapes are in the drawing are and none of them is selected. Is there a way to determine if a shape is in the drawing area. By knowing the name of the shape, I couldn't find a way to determine if a shape is already in the drawingview.
Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Volvick,

you can check if a shape is in the currently shown area of the view by simply testing if the shape's bounds are within the bounds of the drawing view's viewport. For example:

if (view.Viewport.Bounds.Contains(shape.Bounds))

{

      // The shape is in the currently displayed area of the view

}



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search