private void ZmienWartosc_Piksela() { if (PixelValueChanged != null) { PixelEventArgs nowyEvent = new PixelEventArgs(); nowyEvent.A = _colorA; nowyEvent.R = _colorR; nowyEvent.G = _colorG; nowyEvent.B = _colorB; PixelValueChanged(this, nowyEvent); } }
private void Changed(PikselForm f, PixelEventArgs e) { float ratioX = PixelX / (float)OryginalPictureBox.ClientSize.Width; float ratioY = PixelY / (float)OryginalPictureBox.ClientSize.Height; float imageX = obiektObrazek.Kopia.Width * ratioX; float imageY = obiektObrazek.Kopia.Height * ratioY; obiektObrazek.ClearNext(); obiektObrazek.AddOperation_toList(obiektObrazek.Kopia); obiektObrazek.Kopia.SetPixel((int)imageX, (int)imageY, Color.FromArgb(e.A, e.R, e.G, e.B)); int x = obiektObrazek.Oryginal.Width + zoom; int y = obiektObrazek.Oryginal.Height + zoom; kopia = new Bitmap(obiektObrazek.Kopia, new Size(x, y)); KopiaPictureBox.Image = kopia; }