public class LCD
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CELL_HEIGHT |
static int |
CELL_WIDTH |
static int |
DISPLAY_CHAR_DEPTH |
static int |
DISPLAY_CHAR_WIDTH |
static int |
FONT_HEIGHT |
static int |
FONT_WIDTH |
protected static GraphicsLCD |
g |
static int |
NOOF_CHARS |
static int |
ROP_AND |
static int |
ROP_ANDINVERTED |
static int |
ROP_ANDREVERSE |
static int |
ROP_CLEAR
Common raster operations for use with bitBlt
|
static int |
ROP_COPY |
static int |
ROP_COPYINVERTED |
static int |
ROP_EQUIV |
static int |
ROP_INVERT |
static int |
ROP_NAND |
static int |
ROP_NOOP |
static int |
ROP_NOR |
static int |
ROP_OR |
static int |
ROP_ORINVERTED |
static int |
ROP_ORREVERSE |
static int |
ROP_SET |
static int |
ROP_XOR |
static int |
SCREEN_HEIGHT |
static int |
SCREEN_WIDTH |
protected static TextLCD |
t |
Modifier and Type | Method and Description |
---|---|
static void |
asyncRefresh()
Start the process of updating the display.
|
static void |
asyncRefreshWait()
Wait for the current refresh cycle to complete.
|
static void |
bitBlt(byte[] src,
int sw,
int sh,
int sx,
int sy,
byte[] dst,
int dw,
int dh,
int dx,
int dy,
int w,
int h,
int rop)
Standard two input BitBlt function.
|
static void |
bitBlt(byte[] src,
int sw,
int sh,
int sx,
int sy,
int dx,
int dy,
int w,
int h,
int rop)
Standard two input BitBlt function with the LCD display as the
destination.
|
static void |
clear()
Clear the display.
|
static void |
clear(int y)
Clear an LCD display row
|
static void |
clear(int x,
int y,
int n)
Clear a contiguous set of characters
|
static void |
clearDisplay() |
static void |
drawChar(char c,
int x,
int y)
Draw a single char on the LCD at specified x,y co-ordinate.
|
static void |
drawInt(int i,
int x,
int y)
Display an int on the LCD at specified x,y co-ordinate.
|
static void |
drawInt(int i,
int places,
int x,
int y)
Display an in on the LCD at x,y with leading spaces to occupy at least the number
of characters specified by the places parameter.
|
static void |
drawString(java.lang.String str,
int x,
int y)
Display a string on the LCD at specified x,y co-ordinate.
|
static void |
drawString(java.lang.String str,
int x,
int y,
boolean inverted)
Display an optionally inverted string on the LCD at specified x,y co-ordinate.
|
static byte[] |
getDisplay()
Provide access to the LCD display frame buffer.
|
static byte[] |
getHWDisplay() |
static int |
getPixel(int x,
int y)
Method to get a pixel from the screen.
|
static long |
getRefreshCompleteTime()
Obtain the system time when the current display refresh operation will
be complete.
|
static byte[] |
getSystemFont()
Provide access to the LCD system font.
|
static void |
refresh()
Refresh the display.
|
static void |
scroll()
Scrolls the screen up one text line
|
static void |
setAutoRefresh(boolean on)
Turn on/off the automatic refresh of the LCD display.
|
static int |
setAutoRefreshPeriod(int period)
Set the period used to perform automatic refreshing of the display.
|
static void |
setContrast(int contrast)
Set the LCD contrast.
|
static void |
setPixel(int x,
int y,
int color)
Method to set a pixel on the screen.
|
public static final int SCREEN_WIDTH
public static final int SCREEN_HEIGHT
public static final int NOOF_CHARS
public static final int FONT_WIDTH
public static final int FONT_HEIGHT
public static final int CELL_WIDTH
public static final int CELL_HEIGHT
public static final int DISPLAY_CHAR_WIDTH
public static final int DISPLAY_CHAR_DEPTH
public static final int ROP_CLEAR
public static final int ROP_AND
public static final int ROP_ANDREVERSE
public static final int ROP_COPY
public static final int ROP_ANDINVERTED
public static final int ROP_NOOP
public static final int ROP_XOR
public static final int ROP_OR
public static final int ROP_NOR
public static final int ROP_EQUIV
public static final int ROP_INVERT
public static final int ROP_ORREVERSE
public static final int ROP_COPYINVERTED
public static final int ROP_ORINVERTED
public static final int ROP_NAND
public static final int ROP_SET
protected static TextLCD t
protected static GraphicsLCD g
public static void bitBlt(byte[] src, int sw, int sh, int sx, int sy, int dx, int dy, int w, int h, int rop)
src
- byte array containing the source imagesw
- Width of the source imagesh
- Height of the source imagesx
- X position to start the copy fromsy
- Y Position to start the copy fromdx
- X destinationdy
- Y destinationw
- width of the area to copyh
- height of the area to copyrop
- raster operation.public static void drawChar(char c, int x, int y)
c
- Character to displayx
- X locationy
- Y locationpublic static void clearDisplay()
public static void drawString(java.lang.String str, int x, int y, boolean inverted)
str
- The string to be displayedx
- The x character co-ordinate to display at.y
- The y character co-ordinate to display at.inverted
- if true the string is displayed inverted.public static void drawString(java.lang.String str, int x, int y)
str
- The string to be displayedx
- The x character co-ordinate to display at.y
- The y character co-ordinate to display at.public static void drawInt(int i, int x, int y)
i
- The value to display.x
- The x character co-ordinate to display at.y
- The y character co-ordinate to display at.public static void drawInt(int i, int places, int x, int y)
i
- The value to displayplaces
- number of places to use to display the valuex
- The x character co-ordinate to display at.y
- The y character co-ordinate to display at.public static void asyncRefresh()
public static long getRefreshCompleteTime()
public static void asyncRefreshWait()
public static void refresh()
public static void clear()
public static byte[] getDisplay()
public static byte[] getSystemFont()
public static int setAutoRefreshPeriod(int period)
period
- time in mspublic static void setAutoRefresh(boolean on)
on
- true to enable, false to disablepublic static void setPixel(int x, int y, int color)
x
- the x coordinatey
- the y coordinatecolor
- the pixel color (0 = white, 1 = black)public static int getPixel(int x, int y)
x
- the x coordinatey
- the y coordinatepublic static void bitBlt(byte[] src, int sw, int sh, int sx, int sy, byte[] dst, int dw, int dh, int dx, int dy, int w, int h, int rop)
src
- byte array containing the source imagesw
- Width of the source imagesh
- Height of the source imagesx
- X position to start the copy fromsy
- Y Position to start the copy fromdst
- byte array containing the destination imagedw
- Width of the destination imagedh
- Height of the destination imagedx
- X destinationdy
- Y destinationw
- width of the area to copyh
- height of the area to copyrop
- raster operation.public static void scroll()
public static void clear(int x, int y, int n)
x
- the x character coordinatey
- the y character coordinaten
- the number of characterspublic static void clear(int y)
y
- the row to clearpublic static void setContrast(int contrast)
contrast
- 0 blank 0x60 full onpublic static byte[] getHWDisplay()