Example #1
0
        private void test_Click(object sender, RoutedEventArgs e)
        {
            DDA      dda      = new DDA(0, 0, 20, 20);
            DrawLine drawLine = new DrawLine(ref dda.points, ref textBlocks, brush);

            drawLine.Draw();
        }
Example #2
0
        private void Center_Circle_Int_Click(object sender, RoutedEventArgs e)
        {
            float x, y, Rad;

            x   = (float)Convert.ToDouble(c_x.Text);
            y   = (float)Convert.ToDouble(c_y.Text);
            Rad = (float)Convert.ToDouble(rad.Text);

            Center_Circle_Int cen      = new Center_Circle_Int(x, -y, Rad);
            DrawLine          drawLine = new DrawLine(ref cen.points, ref textBlocks, brush);

            drawLine.Draw();

            Ellipse ellipse = new Ellipse()
            {
                Width = Rad * 20, Height = Rad * 20, Opacity = 1.5, Stroke = new SolidColorBrush(Colors.Red), StrokeThickness = 5
            };

            Canvas.SetLeft(ellipse, (x - Rad) * 10 + 255);
            Canvas.SetTop(ellipse, -(y + Rad) * 10 + 255);
            canvas.Children.Add(ellipse);
        }