Roimageplayer – BrightSign HD2000 Object Reference Manual User Manual

Page 24

Advertising
background image

roImagePlayer

Display static bitmap images on the video display.

Interfaces:

 ifImageControl

rotBOOL DisplayFile(rotSTRING image_filename)
rotBOOL PreloadFile(rotSTRING filename)
rotBOOL DisplayPreload()
rotBOOL StopDisplay() // removes an image from the display
rotBOOL DisplayFileEx(rotSTRING filename, rotINT32 mode,

rotINT32 x, rotINT32 y)

rotBOOL PreloadFileEx(rotSTRING filename, rotINT32 mode,

rotINT32 x, rotINT32 y)


rotBOOL SetDefaultMode(rotINT32 mode);

rotBOOL SetDefaultTransition(roINT32 transition)

rotVOID SetRectangle(roRectangle r)


The simplest way to use roImagePlayer is to just make calls to “DisplayFile”. Or you can use
PreloadFile()/DisplayPreload() to have more control.

PreloadFile loads the file into memory into an off-screen buffer. DisplayPreload then displays the image in
memory to the screen using the on-screen buffer. There are only two memory buffers, one is displayed on
screen, the other can be used for preloading. PreloadFile can be called multiple times before
DisplayPreload is called and will keep loading into the same off-screen buffer. DisplayFile does a
PreloadFile followed immediately by a DisplayPreload, so any previously preloaded image will be lost. If
no image is preloaded DisplayPreload will have no effect.

X&Y:
x and y indicate which position of the image to center as near as possible, or can both be set to -1, which
means to use the center of the image as the point to position nearest the center.

SetDefaultMode sets the mode used for DisplayFile and PreloadFile. If this isn't called the mode is 0 which
is centered with no scaling.

image_filename currently must point to a 8-bit, 24-bit, or 32-bit .BMP file. In addition, PNG and JPEG
files are supported on the HD2000.

Display Modes supported are:

 0 - Center image. No scaling takes place, only cropping if the image is bigger than the screen.

 1 - Scale to fit. The image is scaled so that it is fully viewable with its aspect ratio maintained.

 2 - Scale to fill and crop. The image is scaled so that it totally fills the screen, though with its

aspect ratio maintained.

 3 - Scale to fill. The image is stretched so that it fills the screen and the whole image is viewable.

This means that the aspect ratio will not be maintained if it is different to that of the current screen
resolution.


SetDefaultTransition sets the transition to be used when the next image is displayed. Transitions available
include:

 0 - No transition, immediate blit

 1 to 4 - Image wipes from top, bottom, left and right

 5 to 8 - Explodes from centre, top left, top right, bottom left, bottom right

24

Advertising
This manual is related to the following products: