Example #1
0
 /// <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);
 }
Example #2
0
        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);
        }
Example #3
0
        public int AddMousePoint(MousePoint p)
        {
            if (Engine.Application.UISelectedValues.InterpolateMouseMoves)
            {
                t_mousePoints.Add(p);
            }

            // required for BackgroundQueue
            return(0);
        }
Example #4
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);
        }
Example #5
0
        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
             *
             * }*/
        }
Example #6
0
 public MouseEventArgs(int x, int y, Engine.MouseActionType action)
 {
     MousePoint = new MousePoint(x, y, action);
 }
Example #7
0
 public MouseEventArgs(int x, int y)
 {
     MousePoint = new MousePoint(x, y, MouseActionType.Undefined);
 }