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)
93 lines (92 loc) • 3.06 kB
TypeScript
/** @format */
import { PvrColorRgbCore } from './pvr-color-rgb-core.js';
/**
* Represents an RGBA color.
*/
export declare class PvrColorRgba implements PvrColorRgbCore<PvrColorRgba> {
/**
* Red component of the color.
*/
private _r;
/**
* Gets the red component of the color.
*/
get r(): number;
/**
* Green component of the color.
*/
private _g;
/**
* Gets the green component of the color.
*/
get g(): number;
/**
* Blue component of the color.
*/
private _b;
/**
* Gets the blue component of the color.
*/
get b(): number;
/**
* Alpha component of the color.
*/
private _a;
/**
* Gets the alpha component of the color.
*/
get a(): number;
/**
* Initializes a new instance of the PvrColorRgba class.
* @param {number} r - Red component of the color.
* @param {number} g - Green component of the color.
* @param {number} b - Blue component of the color.
* @param {number} a - Alpha component of the color.
*/
constructor(r?: number, g?: number, b?: number, a?: number);
/**
* Creates a new PvrColorRgba instance from another instance.
* @param {PvrColorRgba} other - The other PvrColorRgba instance.
* @returns {PvrColorRgba} A new PvrColorRgba instance.
*/
static from(other: PvrColorRgba): PvrColorRgba;
/**
* Creates a copy of the current PvrColorRgba instance.
* @returns {PvrColorRgba} A new PvrColorRgba instance.
*/
copy(): PvrColorRgba;
/**
* Sets the minimum values for each color component.
* @param {PvrColorRgba} c - The PvrColorRgba instance to compare with.
*/
setMin(c: PvrColorRgba): void;
/**
* Sets the maximum values for each color component.
* @param {PvrColorRgba} c - The PvrColorRgba instance to compare with.
*/
setMax(c: PvrColorRgba): void;
/**
* Multiplies each color component by a given factor.
* @param {number} x - The factor to multiply by.
* @returns {PvrColorRgba} A new PvrColorRgba instance with multiplied components.
*/
mul(x: number): PvrColorRgba;
/**
* Adds the color components of another PvrColorRgba instance.
* @param {PvrColorRgba} x - The PvrColorRgba instance to add.
* @returns {PvrColorRgba} A new PvrColorRgba instance with added components.
*/
add(x: PvrColorRgba): PvrColorRgba;
/**
* Subtracts the color components of another PvrColorRgba instance.
* @param {PvrColorRgba} x - The PvrColorRgba instance to subtract.
* @returns {PvrColorRgba} A new PvrColorRgba instance with subtracted components.
*/
sub(x: PvrColorRgba): PvrColorRgba;
/**
* Calculates the dot product of the current instance and another PvrColorRgba instance.
* @param {PvrColorRgba} x - The PvrColorRgba instance to calculate the dot product with.
* @returns {number} The dot product of the two instances.
*/
dotProd(x: PvrColorRgba): number;
}