image-in-browser
Version:
Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)
47 lines (46 loc) • 1.31 kB
TypeScript
/** @format */
import { Pixel } from './pixel.js';
/**
* Iterator class for iterating over a range of pixels.
*/
export declare class PixelRangeIterator implements Iterator<Pixel> {
/**
* The current pixel.
*/
private _pixel;
/**
* The starting x-coordinate of the range.
*/
private _x1;
/**
* The starting y-coordinate of the range.
*/
private _y1;
/**
* The ending x-coordinate of the range.
*/
private _x2;
/**
* The ending y-coordinate of the range.
*/
private _y2;
/**
* Constructs a new PixelRangeIterator.
* @param {Pixel} pixel - The initial pixel.
* @param {number} x - The starting x-coordinate.
* @param {number} y - The starting y-coordinate.
* @param {number} width - The width of the range.
* @param {number} height - The height of the range.
*/
constructor(pixel: Pixel, x: number, y: number, width: number, height: number);
/**
* Returns the next pixel in the range.
* @returns {IteratorResult<Pixel>} The next pixel in the range.
*/
next(): IteratorResult<Pixel>;
/**
* Returns the iterator itself.
* @returns {IterableIterator<Pixel>} The iterator itself.
*/
[Symbol.iterator](): IterableIterator<Pixel>;
}