private void SetPansAndPointsPosition() { double x = CropWidth / 2; double y = CropHeight / 2; // Set pan coordinate TopLeftPan.CoordinateX = -x; TopLeftPan.CoordinateY = -y; TopRightPan.CoordinateX = x; TopRightPan.CoordinateY = -y; BottomLeftPan.CoordinateX = -x; BottomLeftPan.CoordinateY = y; BottomRightPan.CoordinateX = x; BottomRightPan.CoordinateY = y; // Translate pans & points TopLeftPan.TranslateTo(-x, -y, 0); TopLeftPoint.TranslateTo(-x, -y, 0); TopRightPan.TranslateTo(x, -y, 0); TopRightPoint.TranslateTo(x, -y, 0); BottomLeftPan.TranslateTo(-x, y, 0); BottomLeftPoint.TranslateTo(-x, y, 0); BottomRightPan.TranslateTo(x, y, 0); BottomRightPoint.TranslateTo(x, y, 0); // Set pans position type TopLeftPan.CornerPosition = Corner.TopLeft; TopRightPan.CornerPosition = Corner.TopRight; BottomLeftPan.CornerPosition = Corner.BottomLeft; BottomRightPan.CornerPosition = Corner.BottomRight; }
public object Clone() { var clone = (MacroStabilityInwardsSlice)MemberwiseClone(); clone.TopLeftPoint = (Point2D)TopLeftPoint.Clone(); clone.TopRightPoint = (Point2D)TopRightPoint.Clone(); clone.BottomLeftPoint = (Point2D)BottomLeftPoint.Clone(); clone.BottomRightPoint = (Point2D)BottomRightPoint.Clone(); return(clone); }