public class RemoteRequestGraphicsLCD extends java.lang.Object implements GraphicsLCD
BASELINE, BLACK, BOTTOM, DOTTED, HCENTER, LEFT, RIGHT, SOLID, TOP, TRANS_MIRROR, TRANS_MIRROR_ROT180, TRANS_MIRROR_ROT270, TRANS_MIRROR_ROT90, TRANS_NONE, TRANS_ROT180, TRANS_ROT270, TRANS_ROT90, VCENTER, WHITEROP_AND, ROP_ANDINVERTED, ROP_ANDREVERSE, ROP_CLEAR, ROP_COPY, ROP_COPYINVERTED, ROP_EQUIV, ROP_INVERT, ROP_NAND, ROP_NOOP, ROP_NOR, ROP_OR, ROP_ORINVERTED, ROP_ORREVERSE, ROP_SET, ROP_XOR| Constructor and Description |
|---|
RemoteRequestGraphicsLCD(java.io.ObjectInputStream is,
java.io.ObjectOutputStream os) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
void |
clear()
Clear the display.
|
void |
copyArea(int sx,
int sy,
int w,
int h,
int x,
int y,
int anchor)
Copy one rectangular area of the drawing surface to another.
|
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Draw an arc, using the current color and style.
|
void |
drawChar(char character,
int x,
int y,
int anchor)
Draw a single character to the graphics surface using the current color.
|
void |
drawChars(char[] data,
int offset,
int length,
int x,
int y,
int anchor)
Draw a series of characters to the graphics surface using the current color.
|
void |
drawImage(Image src,
int x,
int y,
int anchor)
Draw the specified image to the graphics surface, using the supplied rop.
|
void |
drawLine(int x0,
int y0,
int x1,
int y1)
Draw a line between the specified points, using the current color and style.
|
void |
drawRect(int x,
int y,
int width,
int height)
Draw a rectangle using the current color and style.
|
void |
drawRegion(Image src,
int sx,
int sy,
int w,
int h,
int transform,
int x,
int y,
int anchor)
Draw the specified region of the supplied image to the graphics surface.
|
void |
drawRegionRop(Image src,
int sx,
int sy,
int w,
int h,
int x,
int y,
int anchor,
int rop)
Draw the specified image to the graphics surface, using the supplied rop.
|
void |
drawRegionRop(Image src,
int sx,
int sy,
int w,
int h,
int transform,
int x,
int y,
int anchor,
int rop)
Draw the specified region of the source image to the graphics surface
after applying the requested transformation, use the supplied rop.
|
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Draw a rounded rectangle.
|
void |
drawString(java.lang.String str,
int x,
int y,
int anchor)
Draws the specified String using the current font and color.
|
void |
drawString(java.lang.String str,
int x,
int y,
int anchor,
boolean inverted)
Draws the specified String using the current font and color.
|
void |
drawSubstring(java.lang.String str,
int offset,
int len,
int x,
int y,
int anchor)
Draw a substring to the graphics surface using the current color.
|
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Draw a filled arc, using the current color.
|
void |
fillRect(int x,
int y,
int w,
int h)
Draw a filled rectangle using the current color.
|
byte[] |
getDisplay()
Provide access to the LCD display frame buffer.
|
Font |
getFont()
Return the currently selected font object.
|
int |
getHeight()
Return the height of the associated drawing surface.
|
byte[] |
getHWDisplay()
Get access to hardware LCD display.
|
int |
getPixel(int x,
int y)
Method to get a pixel from the screen.
|
int |
getStrokeStyle()
Return the current stroke style.
|
int |
getTranslateX()
Gets the X coordinate of the translated origin of this graphics context.
|
int |
getTranslateY()
Gets the Y coordinate of the translated origin of this graphics context.
|
int |
getWidth()
Return the width of the associated drawing surface.
|
void |
refresh()
Refresh the display.
|
void |
setAutoRefresh(boolean on)
Turn on/off the automatic refresh of the LCD display.
|
int |
setAutoRefreshPeriod(int period)
Set the period used to perform automatic refreshing of the display.
|
void |
setColor(int rgb)
Set the current drawing color.
|
void |
setColor(int red,
int green,
int blue)
Sets the current color to the specified RGB values.
|
void |
setContrast(int contrast)
Set the LCD contrast.
|
void |
setFont(Font f)
Set the current font
|
void |
setPixel(int x,
int y,
int color)
Method to set a pixel on the screen.
|
void |
setStrokeStyle(int style)
Set the stroke style to be used for drawing operations.
|
void |
translate(int x,
int y)
Translates the origin of the graphics context to the point
(x, y) in the current coordinate system.
|
public RemoteRequestGraphicsLCD(java.io.ObjectInputStream is,
java.io.ObjectOutputStream os)
public void refresh()
CommonLCDpublic void clear()
CommonLCDpublic int getWidth()
CommonLCDpublic int getHeight()
CommonLCDpublic byte[] getDisplay()
CommonLCDgetDisplay in interface CommonLCDpublic byte[] getHWDisplay()
CommonLCDgetHWDisplay in interface CommonLCDpublic void setContrast(int contrast)
CommonLCDsetContrast in interface CommonLCDcontrast - 0 blank 0x60 full onpublic void bitBlt(byte[] src,
int sw,
int sh,
int sx,
int sy,
int dx,
int dy,
int w,
int h,
int rop)
CommonLCDbitBlt in interface CommonLCDsrc - 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 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)
CommonLCDbitBlt in interface CommonLCDsrc - 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 void setAutoRefresh(boolean on)
CommonLCDsetAutoRefresh in interface CommonLCDon - true to enable, false to disablepublic int setAutoRefreshPeriod(int period)
CommonLCDsetAutoRefreshPeriod in interface CommonLCDperiod - time in mspublic void setPixel(int x,
int y,
int color)
GraphicsLCDsetPixel in interface GraphicsLCDx - the x coordinatey - the y coordinatecolor - the pixel color (0 = white, 1 = black)public int getPixel(int x,
int y)
GraphicsLCDgetPixel in interface GraphicsLCDx - the x coordinatey - the y coordinatepublic void drawString(java.lang.String str,
int x,
int y,
int anchor,
boolean inverted)
GraphicsLCDdrawString in interface GraphicsLCDstr - the String to be drawnx - the x coordinate of the anchor pointy - the y coordinate of the anchor pointanchor - the anchor point for positioning the textinverted - true to invert the text display.public void drawString(java.lang.String str,
int x,
int y,
int anchor)
GraphicsLCDdrawString in interface GraphicsLCDstr - the String to be drawnx - the x coordinate of the anchor pointy - the y coordinate of the anchor pointanchor - the anchor point for positioning the textpublic void drawSubstring(java.lang.String str,
int offset,
int len,
int x,
int y,
int anchor)
GraphicsLCDdrawSubstring in interface GraphicsLCDstr - the base stringoffset - the start of the sub stringlen - the length of the sub stringx - the x coordinate of the anchor pointy - the x coordinate of the anchor pointanchor - the anchor point used to position the text.public void drawChar(char character,
int x,
int y,
int anchor)
GraphicsLCDdrawChar in interface GraphicsLCDcharacter - the character to drawx - the x coordinate of the anchor pointy - the x coordinate of the anchor pointanchor - the anchor point used to position the text.public void drawChars(char[] data,
int offset,
int length,
int x,
int y,
int anchor)
GraphicsLCDdrawChars in interface GraphicsLCDdata - the charactersoffset - the start of the characters to be drawnlength - the length of the character string to drawx - the x coordinate of the anchor pointy - the x coordinate of the anchor pointanchor - the anchor point used to position the text.public int getStrokeStyle()
GraphicsLCDgetStrokeStyle in interface GraphicsLCDpublic void setStrokeStyle(int style)
GraphicsLCDsetStrokeStyle in interface GraphicsLCDstyle - new style.public void drawRegionRop(Image src, int sx, int sy, int w, int h, int x, int y, int anchor, int rop)
GraphicsLCDdrawRegionRop in interface GraphicsLCDsrc - image to draw (may be null for ops that do not require input.sx - x offset in the sourcesy - y offset in the sourcew - width of area to drawh - height of area to draw.x - destinationy - destinationanchor - location of the anchor pointrop - drawing operation.Imagepublic void drawRegionRop(Image src, int sx, int sy, int w, int h, int transform, int x, int y, int anchor, int rop)
GraphicsLCDdrawRegionRop in interface GraphicsLCDsrc - The source imagesx - x coordinate of the regionsy - y coordinate of the regionw - width of the regionh - height of the regiontransform - the required transformx - x coordinate of the anchor pointy - y coordinate of the anchor pointanchor - type of anchorrop - raster operation used to draw the output.public void drawRegion(Image src, int sx, int sy, int w, int h, int transform, int x, int y, int anchor)
GraphicsLCDdrawRegion in interface GraphicsLCDsrc - image to draw (may be null for ops that do not require input.sx - x offset to the regionsy - y offset to the regionw - width of the regionh - height of the regionx - destinationy - destinationanchor - location of the anchor pointImagepublic void drawImage(Image src, int x, int y, int anchor)
GraphicsLCDdrawImage in interface GraphicsLCDsrc - image to draw (may be null for ops that do not require input.x - destinationy - destinationanchor - location of the anchor pointImagepublic void drawLine(int x0,
int y0,
int x1,
int y1)
GraphicsLCDdrawLine in interface GraphicsLCDx0 - x start pointy0 - y start pointx1 - x end pointy1 - y end pointpublic void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
GraphicsLCDdrawArc in interface GraphicsLCDpublic void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
GraphicsLCDfillArc in interface GraphicsLCDpublic void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
GraphicsLCDdrawRoundRect in interface GraphicsLCDpublic void drawRect(int x,
int y,
int width,
int height)
GraphicsLCDdrawRect in interface GraphicsLCDpublic void fillRect(int x,
int y,
int w,
int h)
GraphicsLCDfillRect in interface GraphicsLCDpublic void copyArea(int sx,
int sy,
int w,
int h,
int x,
int y,
int anchor)
GraphicsLCDcopyArea in interface GraphicsLCDsx - Source xsy - Source yw - Source widthh - Source heightx - Destination xy - Destination yanchor - location of the anchor point of the destination.public Font getFont()
GraphicsLCDgetFont in interface GraphicsLCDpublic void setFont(Font f)
GraphicsLCDsetFont in interface GraphicsLCDf - the fontpublic void translate(int x,
int y)
GraphicsLCDtranslate in interface GraphicsLCDx - the new translation origin x valuey - new translation origin y valueGraphicsLCD.getTranslateX(),
GraphicsLCD.getTranslateY()public int getTranslateX()
GraphicsLCDgetTranslateX in interface GraphicsLCDpublic int getTranslateY()
GraphicsLCDgetTranslateY in interface GraphicsLCDpublic void setColor(int rgb)
GraphicsLCDsetColor in interface GraphicsLCDrgb - new color.public void setColor(int red,
int green,
int blue)
GraphicsLCDsetColor in interface GraphicsLCDred - the red componentgreen - the green componentblue - the blue