/// <summary> /// Arranges the objects so they share a common boundary. /// </summary> /// <param name="arrange">Routine that determines how to arrange the element with respect to the master element.</param> public void Arrange(ArrangeElement arrange) { if (m_SelectedObjects.Count < 2) { return; } RectangleF masterbound = m_SelectedObjects[m_SelectedObjects.Count - 1].ObjectPath.GetBounds(); // now move each object to the new position, which is the difference in the position of the bounds.X for (int i = m_SelectedObjects.Count - 2; i >= 0; i--) { IHitTestObject o = m_SelectedObjects[i]; RectangleF bounds = o.ObjectPath.GetBounds(); arrange(o, bounds, masterbound); } _grac.RefreshGraph(); // force a refresh }
/// <summary> /// Arranges the objects so they share a common boundary. /// </summary> /// <param name="arrange">Routine that determines how to arrange the element with respect to the master element.</param> public void Arrange(ArrangeElement arrange) { if (m_SelectedObjects.Count < 2) return; RectangleF masterbound = m_SelectedObjects[m_SelectedObjects.Count - 1].ObjectPath.GetBounds(); // now move each object to the new position, which is the difference in the position of the bounds.X for (int i = m_SelectedObjects.Count - 2; i >= 0; i--) { IHitTestObject o = m_SelectedObjects[i]; RectangleF bounds = o.ObjectPath.GetBounds(); arrange(o, bounds, masterbound); } _grac.RefreshGraph(); // force a refresh }
/// <summary> /// Arranges the objects so they share a common boundary. /// </summary> /// <param name="arrange">Routine that determines how to arrange the element with respect to the master element.</param> public void Arrange(ArrangeElement arrange) { if (SelectedObjects.Count < 2) return; var principalMoveVectorsInRootLayerCoordinates = GetCoordinateSystemRlcBasedOnLayerPlaneFacingTheCameraForSelectedObjects(); var masterbound = SelectedObjects[SelectedObjects.Count - 1].ObjectOutlineForArrangements; // is in root layer coordinates var tmasterbound = masterbound.GetBounds(principalMoveVectorsInRootLayerCoordinates); // Rectangle with transformation in principal move vectors // now move each object to the new position, which is the difference in the position of the bounds.X for (int i = SelectedObjects.Count - 2; i >= 0; i--) { IHitTestObject o = SelectedObjects[i]; var bounds = o.ObjectOutlineForArrangements; // in Root layer coordinates var tbounds = bounds.GetBounds(principalMoveVectorsInRootLayerCoordinates); // Rectangle with transformation in principal coordinates arrange(o, tbounds, tmasterbound, principalMoveVectorsInRootLayerCoordinates); } }