Package lejos.hardware.lcd
Interface CommonLCD
-
- All Known Subinterfaces:
GraphicsLCD,TextLCD
- All Known Implementing Classes:
RemoteGraphicsLCD,RemoteRequestGraphicsLCD,RemoteRequestTextLCD,RemoteTextLCD
public interface CommonLCD
-
-
Field Summary
Fields Modifier and Type Field Description static intROP_ANDstatic intROP_ANDINVERTEDstatic intROP_ANDREVERSEstatic intROP_CLEARCommon raster operations for use with bitBltstatic intROP_COPYstatic intROP_COPYINVERTEDstatic intROP_EQUIVstatic intROP_INVERTstatic intROP_NANDstatic intROP_NOOPstatic intROP_NORstatic intROP_ORstatic intROP_ORINVERTEDstatic intROP_ORREVERSEstatic intROP_SETstatic intROP_XOR
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbitBlt(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.voidbitBlt(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.voidclear()Clear the display.byte[]getDisplay()Provide access to the LCD display frame buffer.intgetHeight()Return the height of the associated drawing surface.byte[]getHWDisplay()Get access to hardware LCD display.intgetWidth()Return the width of the associated drawing surface.voidrefresh()Refresh the display.voidsetAutoRefresh(boolean on)Turn on/off the automatic refresh of the LCD display.intsetAutoRefreshPeriod(int period)Set the period used to perform automatic refreshing of the display.voidsetContrast(int contrast)Set the LCD contrast.
-
-
-
Field Detail
-
ROP_CLEAR
static final int ROP_CLEAR
Common raster operations for use with bitBlt- See Also:
- Constant Field Values
-
ROP_AND
static final int ROP_AND
- See Also:
- Constant Field Values
-
ROP_ANDREVERSE
static final int ROP_ANDREVERSE
- See Also:
- Constant Field Values
-
ROP_COPY
static final int ROP_COPY
- See Also:
- Constant Field Values
-
ROP_ANDINVERTED
static final int ROP_ANDINVERTED
- See Also:
- Constant Field Values
-
ROP_NOOP
static final int ROP_NOOP
- See Also:
- Constant Field Values
-
ROP_XOR
static final int ROP_XOR
- See Also:
- Constant Field Values
-
ROP_OR
static final int ROP_OR
- See Also:
- Constant Field Values
-
ROP_NOR
static final int ROP_NOR
- See Also:
- Constant Field Values
-
ROP_EQUIV
static final int ROP_EQUIV
- See Also:
- Constant Field Values
-
ROP_INVERT
static final int ROP_INVERT
- See Also:
- Constant Field Values
-
ROP_ORREVERSE
static final int ROP_ORREVERSE
- See Also:
- Constant Field Values
-
ROP_COPYINVERTED
static final int ROP_COPYINVERTED
- See Also:
- Constant Field Values
-
ROP_ORINVERTED
static final int ROP_ORINVERTED
- See Also:
- Constant Field Values
-
ROP_NAND
static final int ROP_NAND
- See Also:
- Constant Field Values
-
ROP_SET
static final int ROP_SET
- See Also:
- Constant Field Values
-
-
Method Detail
-
refresh
void refresh()
Refresh the display. If auto refresh is off, this method will wait until the display refresh has completed. If auto refresh is on it will return immediately.
-
clear
void clear()
Clear the display.
-
getWidth
int getWidth()
Return the width of the associated drawing surface.
Note: This is a non standard method.- Returns:
- width of the surface
-
getHeight
int getHeight()
Return the height of the associated drawing surface.
Note: This is a non standard method.- Returns:
- height of the surface.
-
getDisplay
byte[] getDisplay()
Provide access to the LCD display frame buffer.- Returns:
- byte array that is the frame buffer.
-
getHWDisplay
byte[] getHWDisplay()
Get access to hardware LCD display.- Returns:
- byte array that is the frame buffer
-
setContrast
void setContrast(int contrast)
Set the LCD contrast.- Parameters:
contrast- 0 blank 0x60 full on
-
bitBlt
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. Supports standard raster ops and overlapping images. Images are held in native leJOS/Lego format.- Parameters:
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.
-
bitBlt
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. Supports standard raster ops and overlapping images. Images are held in native leJOS/Lego format.- Parameters:
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.
-
setAutoRefresh
void setAutoRefresh(boolean on)
Turn on/off the automatic refresh of the LCD display. At system startup auto refresh is on.- Parameters:
on- true to enable, false to disable
-
setAutoRefreshPeriod
int setAutoRefreshPeriod(int period)
Set the period used to perform automatic refreshing of the display. A period of 0 disables the refresh.- Parameters:
period- time in ms- Returns:
- the previous refresh period.
-
-