Parameters, Returns – Sensoray 2246 User Manual

Page 46

Advertising
background image

MID2246_API int SN_OverlayQuad (int WinIndex, char * imageFile, int x1, int y1, int x2, int

y2, int x3, int y3, int x4, int y4, int regionmask, int board)

Use an image to texture map a 4-sized polygon. The orignal text or image in the overlay is
lost.

Parameters:

WinIndex -- index of sub-window to delete
imageFile -- pointer to overlay image(full path) 24bit BMP or PCX files supported only
x1 x-value of coordinate 1, the upper left corner of the texture
y1 y-value of coordinate 1
x2 x-value of coordinate 2, the upper right corner of the texture
y2 y-value of coordinate 2
x3 x-value of coordinate 3, the lower right corner of the texture
y3 y-value of coordinate 3
x4 x-value of coordinate 4, the lower left corner of the texture
y4 y-value of coordinate 4
regionmask -- output region mask
board ID if multiple boards installed.

Returns:

0 on success, -1 overlay does not exist yet.

MID2246_API int SN_CopyBmpToOverlayZero (char * ImageFile, char * ImageRGBptr, int

xPos, int yPos, int xSize, int ySize, int Backgnd_ForegndN, int board)

Copy given image to region within overlay zero. Assumes Overlay zero is loaded into current
memory Assumes Overlay zero has a width that is divisible by 8 Assumes all other overlays
(1-7) are contained within the boundaries of overlay zero
(It is assumed that the Overlay at Index-0 will be the same size as the input resolution)

Parameters:

ImageFile - Full name/path to image file. 24-bit bmp and pcx files are supported. If NULL, use
Raw 24-bit bitmap pointer Image
ImageRGBptr - Pointer to memory containing 24-bit RGB data Row 0 first
xPos - Horizontal Destination pixel position from left of Bitmap-0 to copy to.
yPos - Vertical Destination pixel position from top of Bitmap-0 to copy to.
xSize - Size of horizontal line in pixels (NOTE: Each pixel is 3 bytes:
LSB=Red,Green,MSB=Blue) Used with Image pointer only.
ySize - Number of Lines. Used with Image pointer only.
Backgnd_ForegndN - Copy directly to currently displayed overlay image when 0. Otherwise copy
to overlay’s double buffered background.
board ID if multiple boards installed.
Returns 0 on success, -1 on failure.

MID2246_API int SN_GetOverlayIdx (int WinIndex, int * Type, int * Region, int * Group, int *

Xpos, int * Ypos, char ** Value, int board)

Get basic parameters of an overlay index

Parameters:

WinIndex -- sub-window position to get parameters from
Type -- Type: 1=Image 0=Text
Region -- Overlay Region, MID2246_REGION_MONITOR | MID2246_REGION_MPEG |
MID2246_REGION_STILL
Group -- Text with common group number is kept together. (-1 indicates not used)
Xpos -- start X position

46

Advertising