ImageBitmap
Interface for handling bitmap image operations. Provides functionality for image manipulation and drawing.
Properties
width
Width of the image in pixels.
readonly width: number
height
Height of the image in pixels.
readonly height: number
channels
Number of color channels in the image.
readonly channels: number
data
Raw image data as ArrayBuffer.
readonly data: ArrayBuffer
Methods
drawRect
Draw a rectangle on the image.
drawRect(rect: FaceRect, color: Color, thickness: number): void
Parameters
Name | Type | Description |
---|---|---|
rect | FaceRect | Rectangle coordinates and dimensions |
color | Color | RGB color for drawing |
thickness | number | Line thickness in pixels |
Returns
void
drawCircleF
Draw a circle using floating-point coordinates.
drawCircleF(point: Point2f, radius: number, color: Color, thickness: number): void
Parameters
Name | Type | Description |
---|---|---|
point | Point2f | Center point of the circle |
radius | number | Radius of the circle |
color | Color | RGB color for drawing |
thickness | number | Line thickness in pixels |
Returns
void
drawCircle
Draw a circle using integer coordinates.
drawCircle(point: Point2i, radius: number, color: Color, thickness: number): void
Parameters
Name | Type | Description |
---|---|---|
point | Point2i | Center point of the circle |
radius | number | Radius of the circle |
color | Color | RGB color for drawing |
thickness | number | Line thickness in pixels |
Returns
void