-
-
Save gdyrrahitis/925ea274b52b4383b355f6e8c23094b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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