public override void MoveHandle(PointF point, int handleNumber, Keys modifiers) { int handle = handleNumber - 1; quadImage[handle] = point; if (inPerspective) { planeIsConvex = quadImage.IsConvex; } else { if ((modifiers & Keys.Shift) == Keys.Shift) { quadImage.MakeSquare(handle); } else { quadImage.MakeRectangle(handle); } } SignalTrackablePointMoved(handle); CalibrationHelper.CalibrationByPlane_Update(quadImage); }
public override void MoveDrawing(float dx, float dy, Keys modifierKeys, bool zooming) { if (zooming) { return; } if (CalibrationHelper == null) { return; } if ((modifierKeys & Keys.Alt) == Keys.Alt) { // Change the number of divisions. styleHelper.GridDivisions = styleHelper.GridDivisions + (int)((dx - dy) / 4); styleHelper.GridDivisions = Math.Min(Math.Max(styleHelper.GridDivisions, minimumSubdivisions), maximumSubdivisions); } else { if (!styleHelper.Perspective) { quadImage.Translate(dx, dy); CalibrationHelper.CalibrationByPlane_Update(Id, quadImage); } } SignalAllTrackablePointsMoved(); }
public void SetTrackablePointValue(string name, PointF value) { int p = int.Parse(name); quadImage[p] = new PointF(value.X, value.Y); projectiveMapping.Update(quadPlane, quadImage); CalibrationHelper.CalibrationByPlane_Update(quadImage); planeIsConvex = quadImage.IsConvex; }