//================================================== //================================================== 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; }
//================================================== //================================================== private void ShapeEditor(ShapeFabric fabric) { shape = fabric.Create(); Shapes.Add(shape); }