private void DrawCenterBox(int sizeX, int sizeY)
        {
            var foxDraw = new FoxDraw(canvas);

            foxDraw.FillColor(Colors.Transparent);
            foxDraw.DrawRectangle(canvas.Width / 2 - sizeX / 2, canvas.Height / 2 - sizeY / 2, sizeX, sizeY);
        }
        private void square(double size, FoxDraw foxDraw)
        {
            double xCenter = Width / 2 - size / 2;
            double yCenter = Height / 2 - size / 2;

            foxDraw.DrawRectangle(xCenter, yCenter, size, size);
        }
Esempio n. 3
0
        private void DrawSquare(int size)
        {
            var foxDraw = new FoxDraw(canvas);

            foxDraw.StrokeColor(Colors.Red);
            foxDraw.DrawRectangle(150 - (size / 2), 150 - (size / 2), size, size);
        }
 public static void PositionSquare(FoxDraw foxDraw, int x)
 {
     {
         foxDraw.StrokeColor(Colors.LightSeaGreen);
         for (int i = 1; i < 4; i++)
         {
             foxDraw.DrawRectangle(255, 165, x, x);
         }
     }
 }
        public static void DrawSquares(FoxDraw foxDraw)
        {
            Random r = new Random();
            double x = 340;

            for (int i = 0; i < 4; i++)
            {
                foxDraw.FillColor(Color.FromRgb((byte)r.Next(), (byte)r.Next(), (byte)r.Next()));
                foxDraw.DrawRectangle(262 - x / 2, 175 - x / 2, x, x);
                x = x - i * 50;
            }
        }
Esempio n. 6
0
        public void DrawBoxToCenter(FoxDraw foxDraw, int boxSize)
        {
            byte  colorFragment = (byte)random.Next(255);
            Color randomColor   = Color.FromRgb(colorFragment, colorFragment, colorFragment);

            foxDraw.FillColor(randomColor);

            double x = (foxDraw.Canvas.Width / 2) - (boxSize / 2);
            double y = (foxDraw.Canvas.Height / 2) - (boxSize / 2);

            foxDraw.DrawRectangle(x, y, boxSize, boxSize);
        }
Esempio n. 7
0
        public static void SquareDrawing(FoxDraw foxDraw)
        {
            double x   = 350;
            Random rnd = new Random();

            for (int i = 0; i < 4; i++)
            {
                foxDraw.FillColor(Color.FromRgb((byte)rnd.Next(), (byte)rnd.Next(), (byte)rnd.Next()));
                foxDraw.DrawRectangle(262 - x / 2, 175 - x / 2, x, x);
                x = x - i * 50;
            }
        }
Esempio n. 8
0
        public static void DrawThreeSquares(FoxDraw foxDraw, double size)
        {
            Random random = new Random();

            for (int i = 0; i < 3; i++)
            {
                double centerX = (400 - size) / 2;
                double centerY = (400 - size) / 2;

                foxDraw.FillColor(Color.FromArgb(
                                      (byte)60,
                                      (byte)random.Next(255),
                                      (byte)random.Next(255),
                                      (byte)random.Next(255)));
                foxDraw.DrawRectangle(centerX, centerY, size, size);

                size = size / 2;
            }
        }
Esempio n. 9
0
 public void CenterBox(int size, FoxDraw foxDraw, Random rnd)
 {
     foxDraw.FillColor(Color.FromArgb(RandomByte(rnd), RandomByte(rnd), RandomByte(rnd), RandomByte(rnd)));
     foxDraw.DrawRectangle((canvas.Width - size) / 2, (canvas.Height - size) / 2, size, size);
 }
Esempio n. 10
0
        private void DrawSquare(double size)
        {
            var foxDraw = new FoxDraw(canvas);

            foxDraw.DrawRectangle(150 - size / 2, 150 - size / 2, size, size);
        }
Esempio n. 11
0
 static void CenterSquarez(FoxDraw foxDraw, double size, double canvasW, double canvasH)
 {
     foxDraw.DrawRectangle(canvasW / 2 - size / 2, canvasH / 2 - size / 2, size, size);
 }