Barcode2DMatrix.fromXY constructor
Implementation
factory Barcode2DMatrix.fromXY(
int width,
int height,
double ratio,
bool Function(int x, int y) isDark,
) => Barcode2DMatrix(
width,
height,
ratio,
Iterable<bool>.generate(width * height, (int p) {
final int x = p % height;
final int y = p ~/ height;
return isDark(y, x);
}),
);