Profile Picture

Determine if a Shape is in the Drawing Area

Posted By Volvick Derose 14 Years Ago
Author
Message
Volvick Derose
Posted 14 Years Ago
View Quick Profile
Forum Guru

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
Last Active: 12 Years Ago
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.

Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

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





Similar Topics


Reading This Topic