private void EnvelopeStar(FoxDraw foxDraw)
        {
            for (int i = 0; i <= 800; i += 20)
            {
                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.DrawLine(400, 0, i, 400);
                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.DrawLine(400, 800, i, 400);
                if (i != 400)
                {
                    foxDraw.SetStrokeColor(Color.Parse("#232528"));
                    foxDraw.DrawLine(0, 400, 400, i);
                    foxDraw.SetStrokeColor(Color.Parse("#232528"));
                    foxDraw.DrawLine(800, 400, 400, i);
                }

                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.SetFillColor(Colors.White);
                foxDraw.DrawEllipse(-400, -400, 800, 800);

                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.SetFillColor(Colors.White);
                foxDraw.DrawEllipse(400, -400, 800, 800);


                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.SetFillColor(Colors.White);
                foxDraw.DrawEllipse(-400, 400, 800, 800);

                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.SetFillColor(Colors.White);
                foxDraw.DrawEllipse(400, 400, 800, 800);
            }
        }
示例#2
0
        public void DrawCirlces(double centralX, double centralY, double sizeOfCircle)
        {
            while (sizeOfCircle > 90)
            {
                Point startPoint = CentralPointToStart(centralX, centralY, sizeOfCircle);

                foxDraw.DrawEllipse(startPoint.X, startPoint.Y, sizeOfCircle, sizeOfCircle);

                sizeOfCircle = sizeOfCircle / 2;
                double circleRadius = sizeOfCircle / 2;
                //right side small cirle
                double centralTwoX = centralX + Math.Cos(DegreeToRadian(30)) * circleRadius;
                double centralTwoY = centralY + Math.Sin(DegreeToRadian(30)) * circleRadius;
                startPoint = CentralPointToStart(centralTwoX, centralTwoY, sizeOfCircle);
                foxDraw.DrawEllipse(startPoint.X, startPoint.Y, sizeOfCircle, sizeOfCircle);

                //left side small cirle
                double centralThreeX = centralX - Math.Cos(DegreeToRadian(30)) * circleRadius;
                double centralThreeY = centralY + Math.Sin(DegreeToRadian(30)) * circleRadius;
                startPoint = CentralPointToStart(centralThreeX, centralThreeY, sizeOfCircle);
                foxDraw.DrawEllipse(startPoint.X, startPoint.Y, sizeOfCircle, sizeOfCircle);

                //top small circle
                double centralFourX = centralX;
                double centralFourY = centralY - circleRadius;
                startPoint = CentralPointToStart(centralFourX, centralFourY, sizeOfCircle);
                foxDraw.DrawEllipse(startPoint.X, startPoint.Y, sizeOfCircle, sizeOfCircle);

                DrawCirlces(centralFourX, centralFourY, sizeOfCircle);;
            }
        }
示例#3
0
        public double DrawCircles(double x, double y, double diameter)
        {
            var    foxdraw = new FoxDraw(canvas);
            Random rnd     = new Random();

            Byte[] b = new Byte[3];
            rnd.NextBytes(b);
            Color color = Color.FromRgb(b[0], b[1], b[2]);

            foxdraw.BackgroundColor(Colors.Beige);
            foxdraw.FillColor(Color.FromArgb(0, 255, 255, 255));
            foxdraw.DrawEllipse(x, y, diameter, diameter);
            foxdraw.DrawEllipse(x + (diameter * 0.25), y, diameter / 2, diameter / 2);
            foxdraw.DrawEllipse(x + (diameter * 0.05), y + (diameter * 0.4), diameter / 2, diameter / 2);
            foxdraw.FillColor(color);
            foxdraw.DrawEllipse(x + (diameter * 0.45), y + (diameter * 0.4), diameter / 2, diameter / 2);
            if (diameter > 50)
            {
                DrawCircles(x + (diameter / 2.7), y, diameter / 4);
                DrawCircles(x + (diameter * 0.26), y + (diameter * 0.18), diameter / 4);
                DrawCircles(x + (diameter * 0.49), y + (diameter * 0.18), diameter / 4);
                DrawCircles(x + (diameter * 0.18), y + (diameter * 0.4), diameter / 4);
                DrawCircles(x + (diameter * 0.06), y + (diameter * 0.58), diameter / 4);
                DrawCircles(x + (diameter * 0.29), y + (diameter * 0.58), diameter / 4);
                DrawCircles(x + (diameter * 0.57), y + (diameter * 0.4), diameter / 4);
                DrawCircles(x + (diameter * 0.46), y + (diameter * 0.58), diameter / 4);
                DrawCircles(x + (diameter * 0.69), y + (diameter * 0.58), diameter / 4);
            }
            return(0);
        }
示例#4
0
 public void DrawMoon(FoxDraw foxDraw, int x, int y)
 {
     foxDraw.SetStrokeColor(Colors.Silver);
     foxDraw.SetFillColor(Colors.Silver);
     foxDraw.DrawEllipse(x - 50, y - 50, 100, 100);
     foxDraw.SetStrokeColor(Colors.Black);
     foxDraw.SetFillColor(Colors.Black);
     foxDraw.DrawEllipse(x - 100, y - 60, 120, 120);
 }
示例#5
0
        public void CircleDrawer(FoxDraw draw, double x, double y, double r, int n, int depth)
        {
            if (depth == 0)
            {
                return;
            }
            draw.DrawEllipse(x + canvas.Width / n * 5, y, r / 2, r / 2);
            draw.DrawEllipse(x + canvas.Width / n, y + canvas.Height / (n / 4) * 2, r / 2, r / 2);
            draw.DrawEllipse(x + canvas.Width / n * 9, y + canvas.Height / (n / 4) * 2, r / 2, r / 2);

            CircleDrawer(draw, x + canvas.Width / n * 2, y, r / 2, n, depth - 1);
        }
        private void Circle(FoxDraw foxDraw, int x, int xPos, int yPos, int depth)
        {
            foxDraw.FillColor(Color.FromArgb(0, 0, 0, 0));

            foxDraw.DrawEllipse(m * x / 3, m * x / 12, m * x / 2, m * x / 2);
            foxDraw.DrawEllipse(m * x / 12, m * x / 2, m * x / 2, m * x / 2);
            foxDraw.DrawEllipse(m * x / 12 * 7, m * x / 2, m * x / 2, m * x / 2);
            depth--;

            if (depth > 0)
            {
                Circle(foxDraw, x / 3, xPos / 2, yPos / 3, depth);
                return;
            }
        }
        public MainWindow()
        {
            InitializeComponent();
            var background = new FoxDraw(canvas);

            background.FillColor(Colors.Black);
            background.DrawRectangle(0, 0, 700, 700);


            Random generalrandom = new Random();
            double numofstars    = generalrandom.Next(300, 500);

            Color[] starcolors = { Colors.Wheat, Colors.LightBlue, Colors.LightGoldenrodYellow, Colors.LightYellow };
            for (int i = 0; i <= numofstars; i++)
            {
                InitializeComponent();

                double sizex = generalrandom.Next(1, 3);
                double sizey = sizex;
                double posx  = generalrandom.Next(0, 700);
                double posy  = generalrandom.Next(0, 700);

                var star = new FoxDraw(canvas);
                star.FillColor(starcolors[generalrandom.Next(0, starcolors.Length - 1)]);
                star.StrokeColor(Colors.White);
                star.DrawEllipse(posx, posy, sizex, sizey);
            }

            int transOrionx = generalrandom.Next(0, 700);
            int transOriony = generalrandom.Next(0, 700);

            Orion(transOrionx, transOriony, starcolors[generalrandom.Next(0, starcolors.Length - 1)]);
        }
示例#8
0
        public void DrawCircle(double startX, double startY, double radius1, double radius2)
        {
            FoxDraw foxDraw = new FoxDraw(canvas);

            foxDraw.StrokeColor(Colors.Orange);
            foxDraw.FillColor(Colors.Transparent);

            foxDraw.DrawEllipse(startX, startY, radius1, radius1);
        }
示例#9
0
 public void DrawSun(FoxDraw foxDraw, int x, int y)
 {
     foxDraw.SetStrokeColor(Colors.Yellow);
     foxDraw.SetFillColor(Colors.Yellow);
     foxDraw.DrawEllipse(x - 50, y - 50, 100, 100);
     foxDraw.DrawLine(x - 80, y, x + 80, y);
     foxDraw.DrawLine(x, y + 80, x, y - 80);
     foxDraw.DrawLine(x - 65, y + 65, x + 65, y - 65);
     foxDraw.DrawLine(x - 65, y - 65, x + 65, y + 65);
 }
示例#10
0
        private void EnvelopeStar2(FoxDraw foxDraw)
        {
            int lineTchickness = 2;

            for (int i = 0; i <= 800; i += 20)
            {
                foxDraw.SetStrokeThicknes(lineTchickness);
                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.DrawLine(400, 0, i, 400);
                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.DrawLine(400, 800, i, 400);
                if (i != 400)
                {
                    foxDraw.SetStrokeThicknes(lineTchickness);
                    foxDraw.SetStrokeColor(Color.Parse("#232528"));
                    foxDraw.DrawLine(0, 400, 400, i);
                    foxDraw.SetStrokeColor(Color.Parse("#232528"));
                    foxDraw.DrawLine(800, 400, 400, i);
                }

                foxDraw.SetStrokeThicknes(lineTchickness);
                int circleSize        = 800;
                int circleMiddlePoint = 400;
                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.SetFillColor(Colors.White);
                foxDraw.DrawEllipse(-circleMiddlePoint, -circleMiddlePoint, circleSize, circleSize);

                foxDraw.SetStrokeThicknes(lineTchickness);
                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.SetFillColor(Colors.White);
                foxDraw.DrawEllipse(circleMiddlePoint, -circleMiddlePoint, circleSize, circleSize);


                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.SetFillColor(Colors.White);
                foxDraw.DrawEllipse(-circleMiddlePoint, circleMiddlePoint, circleSize, circleSize);

                foxDraw.SetStrokeColor(Color.Parse("#232528"));
                foxDraw.SetFillColor(Colors.White);
                foxDraw.DrawEllipse(circleMiddlePoint, circleMiddlePoint, circleSize, circleSize);
            }
        }
示例#11
0
        public MainWindow()
        {
            InitializeComponent();
            var foxDraw = new FoxDraw(canvas);

            foxDraw.FillColor(Colors.Transparent);
            foxDraw.StrokeColor(Colors.Sienna);
            foxDraw.DrawEllipse(0, 0, canvas.Width, canvas.Height);

            CircleDrawer(foxDraw, 0, 0, canvas.Width, 20, 3);
        }
        public static void DrawOfTheRings(FoxDraw foxDraw, double origoX, double origoY, double offset)
        {
            foxDraw.DrawEllipse(origoX - offset / 2, origoY - offset / 2, offset, offset);

            if (offset <= 50)
            {
                return;
            }
            else
            {
                DrawOfTheRings(foxDraw, origoX, origoY - offset / 3, offset / 3);
                DrawOfTheRings(foxDraw, origoX - offset / 3, origoY + offset / 3, offset / 3);
                DrawOfTheRings(foxDraw, origoX + offset / 3, origoY + offset / 3, offset / 3);
            }
        }
        private double DrawTheCicle(double x, double y, double rad)
        {
            var foxDraw = new FoxDraw(canvas);

            foxDraw.FillColor(Colors.Transparent);
            foxDraw.StrokeColor(Colors.Black);

            foxDraw.DrawEllipse(x, y, rad, rad);

            if (rad > 10)
            {
                DrawTheCicle(canvas.Width / 4, 0, rad / 2);
                DrawTheCicle(canvas.Width / 25, canvas.Height / 2.6, rad / 2);
                DrawTheCicle(canvas.Width / 2.18, canvas.Height / 2.6, rad / 2);
            }
            return(0);
        }
        public MainWindow()
        {
            InitializeComponent();
            var foxDraw = new FoxDraw(canvas);

            foxDraw.FillColor(Color.FromArgb(0, 0, 0, 0));
            foxDraw.DrawEllipse(0, 0, 600, 600);
            //foxDraw.DrawLine(300, 0, 300, 600);
            //foxDraw.DrawLine(0, 300, 600, 300);
            //foxDraw.DrawEllipse(m * 200, 0, m * 300, m * 300);
            //foxDraw.DrawEllipse(m * 50, m * 300, m * 300, m * 300);
            //foxDraw.DrawEllipse(m * 350, m * 300, m * 300, m * 300);

            //foxDraw.DrawEllipse(x / 3, x - x / 3 * 2, x / 3, x / 3);
            //foxDraw.DrawEllipse(x / 3 * 2, x - x / 3, x / 3, x / 3);
            Circle(foxDraw, 600, 600, 600, 3);
        }
示例#15
0
        static void DrawCircle(FoxDraw foxDraw, Point start, Point end, int count)
        {
            foxDraw.StrokeColor(Colors.Black);
            foxDraw.FillColor(Colors.Transparent);
            foxDraw.DrawEllipse(start.X, start.Y, end.X - start.X, end.Y - start.Y);
            count--;

            if (count > 0)
            {
                Point point1 = new Point(start.X + (end.X - start.X) / 4, start.Y);
                Point point2 = new Point(start.X + (end.X - start.X) * 3 / 4, start.Y + (end.Y - start.Y) / 2);
                Point point3 = new Point(start.X + 0.0335 * (end.X - start.X), start.Y + (end.Y - start.Y) * 3 / 8);
                Point point4 = new Point(start.X + 0.5335 * (end.X - start.X), start.Y + (end.Y - start.Y) * 7 / 8);
                Point point5 = new Point(start.X + (1 - 0.5335) * (end.X - start.X), start.Y + (end.Y - start.Y) * 3 / 8);
                Point point6 = new Point(start.X + (1 - 0.0335) * (end.X - start.X), start.Y + (end.Y - start.Y) * 7 / 8);

                DrawCircle(foxDraw, point1, point2, count);
                DrawCircle(foxDraw, point3, point4, count);
                DrawCircle(foxDraw, point5, point6, count);
            }
        }
示例#16
0
        public void Display(Universe universe)
        {
            int sizeX   = (int)canvas.Width / universe.universe.GetLength(0);
            int sizeY   = (int)canvas.Height / universe.universe.GetLength(1);
            int dotSize = sizeX > sizeY ? sizeY : sizeX; // get minimum

            foxDraw.FillColor(Colors.Coral);
            foxDraw.StrokeColor(Colors.Coral);
            foxDraw.DrawRectangle(0, 0, canvas.Width, canvas.Height);

            foxDraw.FillColor(Colors.CadetBlue);
            foxDraw.StrokeColor(Colors.CadetBlue);
            for (int height = 0; height < universe.universe.GetLength(0); height++)
            {
                for (int width = 0; width < universe.universe.GetLength(1); width++)
                {
                    if (universe.universe[height, width])
                    {
                        foxDraw.DrawEllipse(width * dotSize, height * dotSize, dotSize, dotSize);
                    }
                }
            }
        }
 public static void DrawEllipse(FoxDraw foxDraw)
 {
     foxDraw.DrawEllipse(10, 10, 150, 50);
     foxDraw.FillColor(Colors.Azure);
 }
示例#18
0
 public void DrawCircles(FoxDraw foxDraw, double x, double xPos, double yPos)
 {
     foxDraw.DrawEllipse(xPos, yPos, x, x);
 }
示例#19
0
 public static void DrawMoon(FoxDraw foxDraw)
 {
     foxDraw.SetFillColor(Colors.WhiteSmoke);
     foxDraw.DrawEllipse(720, 0, 80, 80);
 }
        public void Orion(int x, int y, Color z)
        {
            InitializeComponent();

            var orionHead = new FoxDraw(canvas);

            orionHead.FillColor(z);
            orionHead.StrokeColor(Colors.White);
            orionHead.DrawEllipse(30 + x, 0 + y, 2, 2);

            var orionRightShoulder = new FoxDraw(canvas);

            orionRightShoulder.FillColor(z);
            orionRightShoulder.StrokeColor(Colors.White);
            orionRightShoulder.DrawEllipse(0 + x, 10 + y, 3, 3);

            var orionLeftShoulder = new FoxDraw(canvas);

            orionLeftShoulder.FillColor(z);
            orionLeftShoulder.StrokeColor(Colors.White);
            orionLeftShoulder.DrawEllipse(40 + x, 18 + y, 2, 2);

            var orionUppermost = new FoxDraw(canvas);

            orionUppermost.FillColor(z);
            orionUppermost.StrokeColor(Colors.White);
            orionUppermost.DrawEllipse(0 + x, 0 + y, 2, 2);

            var orionBeltLeft = new FoxDraw(canvas);

            orionBeltLeft.FillColor(z);
            orionBeltLeft.StrokeColor(Colors.White);
            orionBeltLeft.DrawEllipse(30 + x, 45 + y, 2, 2);

            var orionBeltMiddle = new FoxDraw(canvas);

            orionBeltMiddle.FillColor(z);
            orionBeltMiddle.StrokeColor(Colors.White);
            orionBeltMiddle.DrawEllipse(25 + x, 47 + y, 3, 3);

            var orionBeltRight = new FoxDraw(canvas);

            orionBeltRight.FillColor(z);
            orionBeltRight.StrokeColor(Colors.White);
            orionBeltRight.DrawEllipse(20 + x, 49 + y, 3, 3);

            var orionLeftLeg = new FoxDraw(canvas);

            orionLeftLeg.FillColor(z);
            orionLeftLeg.StrokeColor(Colors.White);
            orionLeftLeg.DrawEllipse(46 + x, 70 + y, 2, 2);

            var orionRightLeg = new FoxDraw(canvas);

            orionRightLeg.FillColor(z);
            orionRightLeg.StrokeColor(Colors.White);
            orionRightLeg.DrawEllipse(10 + x, 76 + y, 3, 3);

            var orionBowUppermost = new FoxDraw(canvas);

            orionBowUppermost.FillColor(z);
            orionBowUppermost.StrokeColor(Colors.White);
            orionBowUppermost.DrawEllipse(70 + x, 0 + y, 2, 2);

            var orionTop = new FoxDraw(canvas);

            orionTop.FillColor(z);
            orionTop.StrokeColor(Colors.White);
            orionTop.DrawEllipse(72 + x, 8 + y, 2, 2);

            var orionMiddle = new FoxDraw(canvas);

            orionMiddle.FillColor(z);
            orionMiddle.StrokeColor(Colors.White);
            orionMiddle.DrawEllipse(73 + x, 12 + y, 2, 2);

            var orionBottom = new FoxDraw(canvas);

            orionBottom.FillColor(z);
            orionBottom.StrokeColor(Colors.White);
            orionBottom.DrawEllipse(72 + x, 16 + y, 2, 2);

            var orionBottomM = new FoxDraw(canvas);

            orionBottomM.FillColor(z);
            orionBottomM.StrokeColor(Colors.White);
            orionBottomM.DrawEllipse(70 + x, 20 + y, 3, 3);
        }