private void textBoxTekst_TextChanged(object sender, EventArgs e) { rysunek.Usun(gp); Figura figura = new Tekst(buttonKolorLinii.BackColor, (int)numericUpDownGruboscLinii.Value, punktyRobocze.First(), textBoxTekst.Text, font); rysunek.Dodaj(figura); gp = Graphics.FromImage(pictureBoxPodglad.Image); figura.Rysuj(gp); pictureBoxPodglad.Refresh(); }
private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { punktyRobocze.Clear(); punktyRobocze.Add(e.Location); if (radioButtonTekst.Checked) { groupBoxTekst.Visible = true; groupBoxKsztalt.Enabled = false; Figura figura = new Tekst(buttonKolorLinii.BackColor, (int)numericUpDownGruboscLinii.Value, punktyRobocze.First(), textBoxTekst.Text, font); rysunek.Dodaj(figura); } else if (radioButtonWiadro.Checked) { FloodFill(new Bitmap(pictureBoxRamka.Image), e.Location); } } }