public FigurePainter(Brush brush, IFormFigure formFigure, Point startPoint, AbstractFilling typeOfFilling) { this.brush = brush; this.formFigure = formFigure; this.startPoint = startPoint; this.typeOfFilling = typeOfFilling; }
private void Form1_Load(object sender, EventArgs e) { formCanvas.currentBitmap = new Bitmap(pictureBox1.Width, pictureBox1.Height); formCanvas.tmpBitmap = new Bitmap(pictureBox1.Width, pictureBox1.Height); pictureBoxCurrentColor.BackColor = Color.Black; currentFilling = new NoneFilling(currentColor); }
public override AbstractPainter CreatePainter(IFormFigure currentFigure, Color currentColor, int currentSize, Point startPoint, AbstractFilling typeOfFilling) { Brush brush = new Brush(currentColor, currentSize); abstractPainter = new FigurePainter(brush, currentFigure, startPoint, typeOfFilling); return(abstractPainter); }
private void buttonOnlyBorders_Click(object sender, EventArgs e) { currentFilling = new NoneFilling(currentColor); }
private void buttonFigureWithBorders_Click(object sender, EventArgs e) { fillingColor = pictureBoxPrevColor.BackColor; currentFilling = new InsideFilling(fillingColor); }
private void buttonOnlyFigure_Click(object sender, EventArgs e) { currentFilling = new TotalFilling(currentColor); }
abstract public AbstractPainter CreatePainter(IFormFigure currentFigure, Color currentColor, int currentSize, Point startPoint, AbstractFilling typeOfFilling);
public VectorFigurePainter(Brush brush, IFormFigure formFigure, Point startPoint, AbstractFilling typeOfFilling) { this.brush = brush; this.formFigure = formFigure; this.startPoint = startPoint; this.typeOfFilling = typeOfFilling; points = formFigure.CalculateFigure(startPoint, startPoint); }