import { DibImage } from './dib.js'; import { PictureImage } from './picture.js'; /** How a blit's ROP wants the source drawn. */ export type BlitMode = /** SRCCOPY and its neighbours: the source replaces what is under it. */ 'opaque' /** SRCAND: a mask, held until the picture it belongs to arrives. */ | 'mask' /** SRCPAINT: ORed in, so the source's BLACK leaves the ground showing. */ | 'or' /** A ROP that ignores the source, or one whose result is not a picture. */ | 'skip'; /** The destination rectangle a blit paints, in the metafile's own units. */ export interface BlitRect { readonly x: number; readonly y: number; readonly width: number; readonly height: number; } /** * What a ternary raster operation asks a reader to draw. * * @param rop The ROP code, as the record states it. */ export declare function blitMode(rop: number): BlitMode; /** * A sink for a metafile's blits that puts the AND/OR pair back together. * * @param emit Where a finished picture goes — the reader's primitive list. */ export declare function makeBlitter(emit: (prim: PictureImage) => void): { blit: (img: DibImage, dest: BlitRect, rop: number) => void; };