UMD.HCIL.Piccolo.Event.PInputEventArgs.GetDeltaRelativeTo C# (CSharp) Method

GetDeltaRelativeTo() public method

Return the delta between the last and current mouse positions relative to a given node on the pick path.
public GetDeltaRelativeTo ( PNode nodeOnPath ) : SizeF
nodeOnPath PNode /// The returned delta will be in the local coordinate system of this node. ///
return System.Drawing.SizeF
		public virtual SizeF GetDeltaRelativeTo(PNode nodeOnPath) {
			SizeF r = CanvasDelta;
			return pickPath.CanvasToLocal(r, nodeOnPath);
		}

Usage Example

		protected void aNode_MouseDrag(object sender, PInputEventArgs e) {
			PNode aNode = (PNode)sender;
			SizeF delta = e.GetDeltaRelativeTo(aNode);
			aNode.TranslateBy(delta.Width, delta.Height);
			PrintEventCoords(e);
			e.Handled = true;
		}
All Usage Examples Of UMD.HCIL.Piccolo.Event.PInputEventArgs::GetDeltaRelativeTo