6 920i user graphics – Rice Lake iRite IDE User Manual

Page 96

Advertising
background image

92

920i

Programming Reference

6.6

920i User Graphics

iRite

user programs can be used to display graphics. The entire

920i

display is writeable; graphics can be of any

size, up to the full size of the

920i

display, and up to 100 graphic images can be displayed. The actual number of

graphics that can be loaded depends on the size of the graphics and of the user program, both of which reside in
the user program space.

Graphics used in

iRite

programs can be from any source but must be saved as monochrome bitmap (.bmp) files

with write access (file cannot be read-only). To enable the file for use in an

iRite

program, it is converted to a user

program #include (.iri) file using the bmp2iri.exe program (see Figure 6-1).

prompt.bmp

bitmapped graphic

DOS command window: run bmp2iri.exe

C:\bmp2iri prompt

C:\

bmp2iri.exe

g_Prompt : DisplayImage;

Procedure initPrompt;

begin

g_Prompt [1] := 16;

g_Prompt [1] := 16;

g_Prompt [1] := 132153342;

g_Prompt [1] := 2147368956;

g_Prompt [1] := 536350704;

g_Prompt [1] := 2147385342;

g_Prompt [1] := 1073483760;

g_Prompt [1] := 2122218558;

g_Prompt [1] := 1010572920;

g_Prompt [1] := 132121536;

...

bitmap.iri file

Figure 6-1. Example of Converting Bitmapped Graphic (prompt.bmp) to an .iri File

Figure 6-1 shows the conversion process for a graphic file, prompt.bmp, to a user program #include, bitmap.iri.
The conversion is done by running the bmp2iri.exe program in a DOS command window: note that the bmp2iri
program assumes the .bmp extension for the input graphic file (prompt.bmp). If additional files are converted
using bmp2iri.exe, the output of the program is appended to the bitmap.iri file.

To display the graphic, the bitmap.iri file must be incorporated into the user program by doing the following:

In the

iRite

source (.src) file, immediately following the program declaration, add: #include

bitmap.iri

In the startup handler, call the array initialization routine for each graphic.

To display or erase a graphic, or to clear all graphics, call the DrawGraphic API with the appropriate
parameters (see page 67).

Advertising
This manual is related to the following products: