/// <summary> /// /// </summary> /// <param name="e"></param> /// <returns></returns> internal Engine.MousePoint MousePointRelativeToImagePositionAndZoom(Engine.MousePoint e) { // values of mouse points are those relative to PaintualCanvas. If canvas moves, values of mouse points // are ok. Engine.MousePoint p = new MousePoint((int)(e.X / t_zoomFactor), (int)(e.Y / t_zoomFactor)); return(p); }
public static int[] Delta(MousePoint previous, MousePoint current) { int[] delta = new int[2]; delta[0] = current.X - previous.X; delta[1] = current.Y - previous.Y; return(delta); }
public int AddMousePoint(MousePoint p) { if (Engine.Application.UISelectedValues.InterpolateMouseMoves) { t_mousePoints.Add(p); } // required for BackgroundQueue return(0); }
private void OnlyKeepLastMousePoint() { if (t_mousePoints.Count <= 1) { return; } MousePoint last = t_mousePoints[t_mousePoints.Count - 1]; t_mousePoints.Clear(); t_mousePoints.Add(last); }
private void CubicSplineInterpolate(MousePoint p) { // for cubic spline interpolation /*if (this.mousePoints.Count == 3) * { * * // we have three points, we can interpolate * // but only if the distance between those three points is larger * // than the size of the image brush * * }*/ }
public MouseEventArgs(int x, int y, Engine.MouseActionType action) { MousePoint = new MousePoint(x, y, action); }
public MouseEventArgs(int x, int y) { MousePoint = new MousePoint(x, y, MouseActionType.Undefined); }