IEditCommand<TPixel>¶
Namespace Nfty.Core.Editing in assembly Nfty.Core.
One reversible edit over an IEditSurface<TPixel>. Apply captures enough to Undo.
Type parameters
TPixel- The pixel the target surface stores.
Methods¶
Apply(IEditSurface<TPixel>)¶
Applies the edit and returns whether it changed any pixel — a redundant edit (nothing to fill, or painting the value a pixel already holds) returns false so history can skip an empty entry. Re-applying (redo) reports the same verdict the first Apply did.
Parameters
surface(IEditSurface<TPixel>) - The surface to edit.
Returns. True when the edit changed anything.
Undo(IEditSurface<TPixel>)¶
Restores what Apply overwrote.
Parameters
surface(IEditSurface<TPixel>) - The surface to restore.