Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Setting each pixel that was drawn
// back to its previous color
public void Undo()
{
var points = 0;
for (int i = _point.X; i < _point.X + Width; i++)
{
for (int j = _point.Y; j < _point.Y + Height; j++)
{
_bitmap.SetPixel(i, j, _previousState[points++]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.