Package ilcd
Class Graphic
Public Method displayLocalGraphic
static void displayLocalGraphic(int graphicIndex)
Throws:
static void displayLocalGraphic(String graphicNameOrFilename)
Throws:
_INSERT_METHOD_SIGNATURE_HERE_
Description:
Parameter |
Range |
Description |
graphicIndex |
0 ... max. graphic index |
index of the graphic |
Parameter |
Range |
Description |
graphicNameOrFilename |
ASCII chars (0x01 .. 0xFF) or DOS filename (8.3 format) |
name of the graphic or name and path of the graphics file |
Draws a graphic according to the graphic's graphicIndex or graphicNameOrFilename at the current cursor position.
Note
- Graphic alignment is taken into account (refer to Control.setGraphicAlignment(int, int, int)). If the alignment area is smaller than the specified graphic, it will be cropped accordingly.
- When addressing by index, the graphic offset (see Extra.setGraphicOffset(int)) is taken into account.
- When addressing by name, the graphic prefix (refer to Extra.setGraphicNamePrefix(String)) and suffix (refer to Extra.setGraphicNameSuffix(String)) are taken into account.
- The cursor position is not changed.
- If an alpha value other than 255 was set before (see Attribute.setAlpha(int)), filling is done with the according opacity.
- Any previously set adjustments for graphics are taken into account (see Attribute.setAdjustmentForGraphics(int)).
- The graphicIndex range from 0xFFE0 to 0xFFFF is reserved for internal use!
- When inverse mode is on, the graphic is shown in inverse mode.
- Graphics with transparencies are always drawn transparent, regardless of the transparent mode (see Attribute.setTransparentModeEnabled(boolean)).
- Monochrome graphics drawn on a color iLCD panelJoC board have the originally black pixels shown in the current foreground value and the originally white pixels shown in the current background color allowing to "dye" monochrome graphics.
- While graphics with a color depth of 8 bit occupy less space in the memory, 16 bit graphics are drawn faster as there is no need for converting calculations.
- To show a graphic from the MicroSD card, the file has to be converted into in the RII (Raw iLCD Graphics Image) format. To do that, use the "Save As" button on iLCD Manager XEJoC Manager's "Graphics" page and select the *.rii filetype.
- When a graphic is stored on the MicroSD card automatically (by activating the option "Store graphics to SD card" in the "Project Settings" section of iLCD Manager XEJoC Manager's "Settings" page), it can still be addressed by its index or name as if they would be stored in flash memory. Graphics stored manually on the MicroSD card can only be loaded by their filenames.
Graphic.displayLocalGraphic(5);
Graphic.displayLocalGraphic("GRAPHIC");
Graphic.displayLocalGraphic("DIR/FILE.RII");
Displays the graphic with index 1 and graphic "GRAPHIC" from the on-board flash as well as graphic "FILE.RII" from the SD card's "DIR" folder at the current cursor position.
See also:
Copyright © demmel products gmbh. All rights reserved.