canvasimo
Version:
An HTML5 canvas drawing library, with 150+ useful methods, jQuery-like fluent interface, and cross-browser compatibility enhancements.
17 lines (13 loc) • 364 B
text/typescript
const pixelData = [0, 0, 0, 0];
export default class ImageDataStub {
public width: number;
public height: number;
public data: number[] = [];
public constructor(width: number, height: number) {
this.width = width;
this.height = height;
for (let i = 0; i < width * height; i += 1) {
this.data = this.data.concat(pixelData);
}
}
}