Ejemplo n.º 1
0
        //==================================================
        //==================================================
        public Main_Form() // Конструктор класса
        {
            InitializeComponent();

            sourceFabric = new SegmentFabric();
            shape        = sourceFabric.Create();

            canvas = new Bitmap(PictureBox.ClientRectangle.Width, PictureBox.ClientRectangle.Height);

            PictureBox.Image = canvas;
            g = Graphics.FromImage(canvas);
            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

            p            = new Pen(Color.Black, (float)NumericUpDown.Value);
            p.StartCap   = System.Drawing.Drawing2D.LineCap.Round;
            Shape.pencil = p;
        }
Ejemplo n.º 2
0
 //==================================================
 //==================================================
 private void ShapeEditor(ShapeFabric fabric)
 {
     shape = fabric.Create();
     Shapes.Add(shape);
 }