EraseStroke<TPixel>¶
Namespace Nfty.Core.Editing in assembly Nfty.Core.
Erases to transparency — sets alpha to 0, keeping every other channel — along a path.
Type parameters
TPixel- The pixel the target surface stores.
Constructors¶
EraseStroke(int, IReadOnlyList<(int, int)>, OpacityLock)¶
public EraseStroke(int size, IReadOnlyList<(int, int)> path, OpacityLock opacity = OpacityLock.Locked);
Erases along a stroke.
Parameters
size(int) - Brush diameter in pixels.path(IReadOnlyList<(int, int)>) - The gesture's pixel path.opacity(OpacityLock) - Carried for symmetry with the other commands; erase writes alpha 0, which both modes admit unchanged.
Methods¶
ComputePixels(IEditSurface<TPixel>)¶
Target pixels and their new values. Only in-bounds pixels, each coordinate at most once; computed before any mutation.
Parameters
surface(IEditSurface<TPixel>) - The surface being edited, for reading the pixels the edit depends on.
Returns. The pixels to write, before the opacity lock is applied to them.