/// <summary>
			/// Initializes a new instance of the <see cref="MovementGripHandle"/> class.
			/// </summary>
			/// <param name="parent">The parent hit test object.</param>
			/// <param name="gripPath">The grip path, i.e. the outline that is used to test whether this grip is hitted with the mouse.</param>
			/// <param name="displayPath">The display path, i.e. the outline that is displayed on the plot.</param>
			public MovementGripHandle(IHitTestObject parent, IObjectOutline gripPath, IObjectOutline displayPath)
			{
				if (null == parent)
					throw new ArgumentNullException(nameof(parent));
				if (null == gripPath)
					throw new ArgumentNullException(nameof(gripPath));

				_parent = parent;
				_gripPath = gripPath;
				_displayedPath = displayPath ?? gripPath;
			}
            /// <summary>
            /// Initializes a new instance of the <see cref="MovementGripHandle"/> class.
            /// </summary>
            /// <param name="parent">The parent hit test object.</param>
            /// <param name="gripPath">The grip path, i.e. the outline that is used to test whether this grip is hitted with the mouse.</param>
            /// <param name="displayPath">The display path, i.e. the outline that is displayed on the plot.</param>
            public MovementGripHandle(IHitTestObject parent, IObjectOutline gripPath, IObjectOutline displayPath)
            {
                if (null == parent)
                {
                    throw new ArgumentNullException(nameof(parent));
                }
                if (null == gripPath)
                {
                    throw new ArgumentNullException(nameof(gripPath));
                }

                _parent        = parent;
                _gripPath      = gripPath;
                _displayedPath = displayPath ?? gripPath;
            }
示例#3
0
 public ObjectOutlineForArrangementsWrapper(IObjectOutline outline)
 {
     _outline = outline;
 }
示例#4
0
		public ObjectOutlineForArrangementsWrapper(IObjectOutline outline)
		{
			_outline = outline;
		}
示例#5
0
 public NoopGrip(IObjectOutline displayPath)
 {
     _displayPath = displayPath;
 }
示例#6
0
 /// <summary>
 /// Creates a new HitTestObject.
 /// </summary>
 /// <param name="objectPath">Path of the object outline used for arrangement of multiple objects.
 /// You have to provide it in coordinates of the parent layer.</param>
 /// <param name="hitobject">The hitted object.</param>
 /// <param name="localToWorldTransformation">The transformation that transformes from the coordinate space in which the hitted object is embedded to world coordinates. This is usually the transformation from the layer coordinates to the root layer coordinates, but does not include the object's transformation.</param>
 public HitTestObject(IObjectOutline objectPath, object hitobject, Matrix4x3 localToWorldTransformation)
     : base(hitobject, localToWorldTransformation)
 {
     _objectPath = objectPath;
 }
示例#7
0
		private RectangleD3D GetBounds(IObjectOutline outline, Matrix3x3 transformation)
		{
			return RectangleD3D.NewRectangleIncludingAllPoints(AsPoints(outline).Select(p => transformation.Transform(p)));
		}
示例#8
0
		private static IEnumerable<PointD3D> AsPoints(IObjectOutline outline)
		{
			foreach (var line in outline.AsLines)
			{
				yield return line.P0;
				yield return line.P1;
			}
		}