Sensoray 2253 Linux User Manual
Page 23

unsigned char data[0]; // data must contain headers that
// describe image dimensions
};
#define OVERLAY_UPDATE_DISPLAY 1
#define OVERLAY_UPDATE_POSITION 2
#define OVERLAY_UPDATE_TRANSPARENT 4
Upload an image to be overlaid on the video output frames. The device
remembers the id where each image was placed, allowing it to be moved
later. To move an existing overlay image, set the id, set length to zero, set
update to OVERLAY_UPDATE_POSITION, and set the x and y offets to the new
position. Due to hardware limitations, the x offset may be limited to a
multiple of 2 (output display only.) The transparent setting allows the overlay
to have a transparency effect, allowing the underlying video to be mixed with
the image. When transparent is 8, the alpha channel in a 32-bit PNG or BMP
will be used. To hide an existing image, update the id with transparent set to
zero and update set to OVERLAY_UPDATE_TRANSPARENT. When update bit 0
is not set, the images are rendered to a working buffer, and don't become
visible until an operation is called with update bit 0 set to
OVERLAY_UPDATE_DISPLAY (recommended for batch updates.)
Image overlays are destructive; moving or overlapping images will cause the
previous image to be overwritten by the rectangular region of the updated
image, regardless of the transparency setting.
Lines may be drawn using overlay image data in the following format:
4 bytes: "line"
1 or more struct s2253_line {
int x1;
int y1;
int x2;
int y2;
int width;
int argb;
};
(struct s2253_overlay_image members id, transparent, xOffset, yOffset are
not used for line drawing)
The line width parameter is useful for drawing squares, by drawing a vertical
line with a large line width. For example, to clear the whole screen send
data:
"line"
x1=0
y1=0
x2=0
y2=575
23