Exemplo n.º 1
0
 public FigurePainter(Brush brush, IFormFigure formFigure, Point startPoint, AbstractFilling typeOfFilling)
 {
     this.brush         = brush;
     this.formFigure    = formFigure;
     this.startPoint    = startPoint;
     this.typeOfFilling = typeOfFilling;
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 private void buttonOnlyBorders_Click(object sender, EventArgs e)
 {
     currentFilling = new NoneFilling(currentColor);
 }
Exemplo n.º 5
0
 private void buttonFigureWithBorders_Click(object sender, EventArgs e)
 {
     fillingColor   = pictureBoxPrevColor.BackColor;
     currentFilling = new InsideFilling(fillingColor);
 }
Exemplo n.º 6
0
 private void buttonOnlyFigure_Click(object sender, EventArgs e)
 {
     currentFilling = new TotalFilling(currentColor);
 }
Exemplo n.º 7
0
 abstract public AbstractPainter CreatePainter(IFormFigure currentFigure, Color currentColor, int currentSize, Point startPoint, AbstractFilling typeOfFilling);
Exemplo n.º 8
0
 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);
 }