public ReplaceColor ( Color oldC, Color newC ) : void | ||
oldC | Color | The color in the image to edit. |
newC | Color | The color to replace with. |
Résultat | void |
private void replaceColorItem_Click(object sender, EventArgs e) { FastBitmap bmap = new FastBitmap(_edit_layer); bmap.LockImage(); bmap.ReplaceColor(bmap.GetPixel(_mouse.X, _mouse.Y), DrawColor); bmap.UnlockImage(); _start_anchor = Point.Empty; _end_anchor.X = _image.Width - 1; _end_anchor.Y = _image.Height - 1; PushHistory(); if (ImageChanged != null) ImageChanged(this, EventArgs.Empty); }
public void ReplacePixels(Color oldCol, Color newCol) { UpdateHistoryBefore(); FastBitmap bmap = new FastBitmap(image); bmap.LockImage(); bmap.ReplaceColor(oldCol, newCol); bmap.UnlockImage(); edit_layer.Dispose(); edit_layer = new Bitmap(image); UpdateHistoryAfter(); }