compose static method

ColorMatrix compose(
  1. Iterable<ColorMatrix> matrices
)

Collapses matrices into a single matrix in application order.

Implementation

static ColorMatrix compose(Iterable<ColorMatrix> matrices) {
  var combined = identity;
  for (final matrix in matrices) {
    combined = combined.followedBy(matrix);
  }
  return combined;
}