import * as ds from "./Types"; import { ObjectManager } from "./ObjectManager"; import { ObjectBase } from "./ObjectBase"; import { type Bitmap } from "./Bitmap"; /** * Represents a bi-level transparency mask or an image containing two colors: black and white * in either a white-is-zero or black-is-zero format. **/ export declare class BilevelBitmap extends ObjectBase { /** * Creates a {@link BilevelBitmap} instance with optionally initialized pixels. * @param width The bi-level bitmap width, in pixels. * @param height The bi-level bitmap height, in pixels. * @param bbProperties The settings for creating a bi-level bitmap. **/ constructor(width: number, height: number, bbProperties?: ds.BilevelBitmapProperties); /** * Creates a {@link BilevelBitmap} instance with optionally initialized pixels. * @param om An object manager that controls the lifetime of the {@link BilevelBitmap} object. * @param width The bi-level bitmap width, in pixels. * @param height The bi-level bitmap height, in pixels. * @param bbProperties The settings for creating a bi-level bitmap. **/ constructor(om: ObjectManager, width: number, height: number, bbProperties?: ds.BilevelBitmapProperties); /** * Gets the width of the {@link BilevelBitmap}, in pixels. **/ get width(): number; /** * Gets the height of the {@link BilevelBitmap}, in pixels. **/ get height(): number; /** * Gets or sets a value specifying whether pixels with lower column indices are stored in the lower-order bits of the byte. **/ get lowerBitsFirst(): boolean; /** * Gets or sets a value specifying whether pixels with lower column indices are stored in the lower-order bits of the byte. **/ set lowerBitsFirst(value: boolean); /** * Gets or sets a value indicating whether the image is used to define an alpha mask of another image. **/ get transparencyMask(): boolean; /** * Gets or sets a value indicating whether the image is used to define an alpha mask of another image. **/ set transparencyMask(value: boolean); /** * Gets or sets a value indicating whether 0 represents white and 1 represents black (if true) or vice versa (if false). **/ get whiteIsZero(): boolean; /** * Gets or sets a value indicating whether 0 represents white and 1 represents black (if true) or vice versa (if false). **/ set whiteIsZero(value: boolean); /** * Creates a {@link Bitmap} instance from the current {@link BilevelBitmap}. * @returns A new instance of the {@link Bitmap} class. **/ toBitmap(): Bitmap; /** * Clears the {@link BilevelBitmap} with the specified value (true is 1, false is 0). * @param value The value to fill the image (true is 1, false is 0). * @param bounds The target rectangle of the {@link BilevelBitmap}. **/ clear(value: boolean, bounds?: ds.Bounds | null): void; /** * Creates a new {@link BilevelBitmap} with a copy of the image. * @param [metadataOnly=false] specifies whether to copy the image metadata only, not actual pixel data. * @returns A new instance of the {@link BilevelBitmap}. **/ clone(metadataOnly?: boolean): BilevelBitmap; /** * Inverts all black pixels to white and all white pixels to black. **/ invertColors(): void; /** * Creates a new {@link BilevelBitmap} with a fragment of the image. * @param x The X coordinate of the clipping rectangle. * @param y The Y coordinate of the clipping rectangle. * @param width The width of the clipping rectangle. * @param height The height of the clipping rectangle. * @param metadataOnly Specifies whether to copy the image metadata only, not actual pixel data. The default is false. * @returns A new {@link BilevelBitmap} with a fragment of the source image. **/ clip(x: number, y: number, width: number, height: number, metadataOnly?: boolean): BilevelBitmap; /** * Creates a new {@link BilevelBitmap} with a fragment of the image. * @param bounds Clipping rectangle of the source image to be extracted as a new {@link BilevelBitmap}. * @param metadataOnly Specifies whether to copy the image metadata only, not actual pixel data. The default is false. * @returns A new {@link BilevelBitmap} with a fragment of the source image. **/ clip(bounds: ds.Bounds, metadataOnly?: boolean): BilevelBitmap; }