|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.LCD
public class LCD
Text and graphics output to the LCD display.
Field Summary | |
---|---|
static int |
CELL_HEIGHT
|
static int |
CELL_WIDTH
|
static int |
DISPLAY_CHAR_DEPTH
|
static int |
DISPLAY_CHAR_WIDTH
|
static int |
DISPLAY_DEPTH
|
static int |
DISPLAY_WIDTH
|
static int |
FONT_HEIGHT
|
static int |
FONT_WIDTH
|
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
|
Constructor Summary | |
---|---|
LCD()
|
Method Summary | |
---|---|
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 |
bitBlt(int dx,
int dy,
int w,
int h,
int rop)
Special case bitBlt with no input image. |
static void |
clear()
Clear the display. |
static void |
clearDisplay()
|
static void |
drawChar(char c,
int x,
int y,
boolean invert)
Draw a single char to an arbitary location on the screen. |
static void |
drawChar(char c,
int x,
int y,
int rop)
Draw a single char to an arbitary location on the screen. |
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 |
drawPixels(byte b,
int x,
int y,
boolean invert)
Draw pixels a byte at a time. |
static void |
drawString(String str,
int x,
int y)
Display a string on the LCD at specified x,y co-ordinate. |
static void |
drawString(String str,
int x,
int y,
boolean invert)
Output a string to the display. |
static void |
drawString(String str,
int x,
int y,
int rop)
Output a string to the display. |
static byte[] |
getDisplay()
Provide access to the LCD display frame buffer. |
static int |
getPixel(int x,
int y)
Method to get a pixel from the screen. |
static byte[] |
getSystemFont()
Provide access to the LCD system font. |
static void |
refresh()
Update the display. |
static void |
scroll()
Scrolls the screen up one text line |
static void |
setAutoRefresh(int mode)
Turn on/off the automatic refresh of the LCD display. |
static void |
setDisplay()
|
static void |
setDisplay(int[] buff)
Write graphics from a Java buffer to the display. |
static void |
setPixel(int rgbColor,
int x,
int y)
Method to set a pixel to screen. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SCREEN_WIDTH
public static final int SCREEN_HEIGHT
public static final int DISPLAY_WIDTH
public static final int DISPLAY_DEPTH
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
Constructor Detail |
---|
public LCD()
Method Detail |
---|
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 bitBlt(int dx, int dy, int w, int h, int rop)
dx
- X destinationdy
- Y destinationw
- width of the area to copyh
- height of the area to copyrop
- raster operation.public static void setPixel(int rgbColor, int x, int y)
rgbColor
- the pixel color (0 = white, 1 = black)x
- the x coordinatey
- the y coordinatepublic static int getPixel(int x, int y)
x
- the x coordinatey
- the y coordinate
public static void drawString(String str, int x, int y, boolean invert)
str
- String to displayx
- X location (pixels)y
- Y location (pixels)invert
- set to true to displayed the string invertedpublic static void drawChar(char c, int x, int y, boolean invert)
c
- Character to displayx
- X location (pixels)y
- Y location (pixels)invert
- Set to true to invert the displaypublic static void drawString(String str, int x, int y, int rop)
str
- String to displayx
- X location (pixels)y
- Y location (pixels)rop
- Raster operationpublic static void drawChar(char c, int x, int y, int rop)
c
- Character to displayx
- X location (pixels)y
- Y location (pixels)rop
- Raster operation for how to combine with existing contentpublic static void drawPixels(byte b, int x, int y, boolean invert)
b
- x
- y
- invert
- public static void clearDisplay()
public static void setDisplay()
public static void drawString(String str, int x, int y)
public static void drawInt(int i, int x, int y)
public static void drawInt(int i, int places, int x, int y)
public static void refresh()
public static void clear()
public static void setDisplay(int[] buff)
public static byte[] getDisplay()
public static byte[] getSystemFont()
public static void setAutoRefresh(int mode)
mode
- 1 to enable 0 to disablepublic 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |