Example #1
0
        public Point[] drawPoints()
        {
            float angle1 = calculateAngle1();

            float angle2 = calculateAngle2();

            Point first  = new Point();
            Point second = new Point();
            Point third  = new Point();

            first.X = f.getCurrentX();
            first.Y = f.getCurrentY();

            second.X = (int)(f.getCurrentX() + side2 * Math.Cos(angle1));
            second.Y = (int)(f.getCurrentY() + side2 * Math.Sin(angle1));

            third.X = (int)(f.getCurrentX() + side3 * Math.Cos(angle2));
            third.Y = (int)(f.getCurrentY() + side3 * Math.Sin(angle2));

            Point[] points = new Point[3];
            points[0] = first;
            points[1] = second;
            points[2] = third;

            return(points);
        }
Example #2
0
        public void doAction()
        {
            using (Graphics g = Graphics.FromImage(f.getBitmap()))
            {
                g.DrawEllipse(Pens.White, f.getCurrentX(), f.getCurrentY(), radius, radius);
                g.Dispose();
            }

            f.getMainDraw().Invalidate();
        }
        public void doAction()
        {
            using (Graphics g = Graphics.FromImage(f.getBitmap()))
            {
                g.DrawRectangle(Pens.White, f.getCurrentX(), f.getCurrentY(), width, height);
                g.Dispose();
            }

            f.getMainDraw().Invalidate();
        }
        public void doAction()
        {
            using (Graphics g = Graphics.FromImage(f.getBitmap()))
            {
                Point currentPoint = new Point(f.getCurrentX(), f.getCurrentY());
                Point drawToPoint  = new Point(x, y);
                g.DrawLine(new Pen(Color.White), currentPoint, drawToPoint);
                g.Dispose();
            }

            f.getMainDraw().Invalidate();
            f.setCurrentX(x);
            f.setCurrentY(y);
            f.getLabelX().Text = "Current X: " + x;
            f.getLabelY().Text = "Current Y: " + y;
        }