public void HandleTranslation(InteractiveImage image, float zoomFactory) { this.hoveredImage = image; hoveredImage.Hovered = true; pts_gathered++; if (isResizing) { return; } var handClosed = handData.FingerCount <= 1; if (isDragging) { hoveredImage.Translate((handData.PalmPoint.Value.X - startDragPoint.X) * zoomFactory, (handData.PalmPoint.Value.Y - startDragPoint.Y) * zoomFactory); } if (handClosed) { //if (pts_gathered % 2 == 0) startDragPoint = new Point(handData.PalmPoint.Value.X, handData.PalmPoint.Value.Y, 0); /*else { startDragPoint.X += handData.PalmPoint.Value.X; startDragPoint.Y += handData.PalmPoint.Value.Y; startDragPoint.X = startDragPoint.X / pts_gathered % 2; startDragPoint.Y = startDragPoint.Y / pts_gathered % 2; }*/ } isDragging = handClosed; }
public void HandleTranslation(InteractiveImage image, float zoomFactory) { this.hoveredImage = image; hoveredImage.Hovered = true; pts_gathered++; if (isResizing) { return; } var handClosed = handData.FingerCount <= 1; if (isDragging) { hoveredImage.Translate((handData.PalmPoint.Value.X - startDragPoint.X) * zoomFactory, (handData.PalmPoint.Value.Y - startDragPoint.Y) * zoomFactory); } if (handClosed) { //if (pts_gathered % 2 == 0) startDragPoint = new Point(handData.PalmPoint.Value.X, handData.PalmPoint.Value.Y, 0); /*else * { * startDragPoint.X += handData.PalmPoint.Value.X; * startDragPoint.Y += handData.PalmPoint.Value.Y; * * startDragPoint.X = startDragPoint.X / pts_gathered % 2; * startDragPoint.Y = startDragPoint.Y / pts_gathered % 2; * }*/ } isDragging = handClosed; }
public void HandleTranslation(InteractiveImage image, float zoomFactory) { this.hoveredImage = image; hoveredImage.Hovered = true; if (isResizing) { return; } var handClosed = handData.FingerCount <= 1; if (isDragging) { hoveredImage.Translate((handData.PalmPoint.Value.X - startDragPoint.X) * zoomFactory, (handData.PalmPoint.Value.Y - startDragPoint.Y) * zoomFactory); } if (handClosed) { startDragPoint = new Point(handData.PalmPoint.Value.X, handData.PalmPoint.Value.Y, 0); } isDragging = handClosed; }