private IGripManipulationHandle[] GetGripsFromSelectedObjects() { if (_selectedObjects.Count == 1) // single object selected { return(_selectedObjects[0].GetGrips(_grac.ZoomFactor, DisplayedGripLevel)); } else // multiple objects selected { var superGrip = new SuperGrip(); // now we have multiple selected objects // we get the grips of all objects and collect them in one supergrip foreach (var sel in _selectedObjects) { var grips = sel.GetGrips(_grac.ZoomFactor, 0); if (grips.Length > 0) { superGrip.Add(grips[0], sel); } } return(new IGripManipulationHandle[] { superGrip }); } }
private IGripManipulationHandle[] GetGripsFromSelectedObjects() { if (_selectedObjects.Count == 1) // single object selected { return _selectedObjects[0].GetGrips(_grac.GC.ZoomFactor, DisplayedGripLevel); } else // multiple objects selected { var superGrip = new SuperGrip(); // now we have multiple selected objects // we get the grips of all objects and collect them in one supergrip foreach (var sel in _selectedObjects) { var grips = sel.GetGrips(_grac.GC.ZoomFactor, 0); if(grips.Length>0) superGrip.Add(grips[0], sel); } return new IGripManipulationHandle[] { superGrip }; } }