filter method
void
filter(
- FilterFunction filter
Run an arbitrary function on the image within the Command graph.
A FilterFunction is in the form Image function(Image)
. A new Image
can be returned, replacing the given Image; or the given Image can be
returned.
@example final image = Command() ..createImage(width: 256, height: 256) ..filter((image) { for (final pixel in image) { pixel.r = pixel.x; pixel.g = pixel.y; } return image; }) ..getImage();
Implementation
void filter(FilterFunction filter) {
subCommand = FilterCmd(subCommand, filter);
}