public class LCDStretch extends EV3DevDevice
Modifier and Type | Class and Description |
---|---|
private class |
LCDStretch.Flusher |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EV3DEV_LCD_DEFAULT |
static java.lang.String |
EV3DEV_LCD_KEY |
static java.lang.String |
EV3DEV_LCD_MODE_KEY |
private JavaFramebuffer |
fb |
private java.awt.Graphics2D |
g2d |
private java.awt.image.BufferedImage |
image |
private static LCDStretch |
instance |
private static Logger |
log |
private int |
stroke |
private java.util.Timer |
timer |
private int |
timer_msec |
private boolean |
timer_run |
ADDRESS, CURRENT_PLATFORM, DEVICE, ev3DevProperties, LEGO_PORT, LEGO_SENSOR, MODE, PATH_DEVICE
Modifier | Constructor and Description |
---|---|
private |
LCDStretch() |
Modifier and Type | Method and Description |
---|---|
private int |
adjustX(int x,
int w,
int anchor)
Adjust the x co-ordinate to use the translation and anchor values.
|
private int |
adjustY(int y,
int h,
int anchor)
Adjust the y co-ordinate to use the translation and anchor values.
|
private byte[] |
any2lejos(java.awt.image.BufferedImage img)
Convert from Java image to leJOS image format
|
private java.awt.image.BufferedImage |
any2rgb(java.awt.Image img) |
private void |
bitBlt(java.awt.image.BufferedImage src,
int sx,
int sy,
java.awt.image.BufferedImage dst,
int dx,
int dy,
int w,
int h,
int rop) |
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)
Slow emulation of leJOS bitBlt()
|
void |
bitBlt(byte[] src,
int sw,
int sh,
int sx,
int sy,
int dx,
int dy,
int w,
int h,
int rop)
Slow emulation of leJOS bitBlt()
|
void |
clear() |
void |
copyArea(int sx,
int sy,
int w,
int h,
int x,
int y,
int anchor) |
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle) |
void |
drawChar(char character,
int x,
int y,
int anchor) |
void |
drawChars(char[] data,
int offset,
int length,
int x,
int y,
int anchor) |
void |
drawImage(java.awt.Image image,
int i,
int i1,
int i2) |
void |
drawLine(int x1,
int y1,
int x2,
int y2) |
void |
drawRect(int x,
int y,
int width,
int height) |
void |
drawRegion(java.awt.Image src,
int sx,
int sy,
int w,
int h,
int transform,
int x,
int y,
int anchor) |
void |
drawRegionRop(java.awt.Image src,
int sx,
int sy,
int w,
int h,
int x,
int y,
int anchor,
int rop) |
void |
drawRegionRop(java.awt.Image src,
int sx,
int sy,
int w,
int h,
int transform,
int x,
int y,
int anchor,
int rop) |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight) |
void |
drawString(java.lang.String str,
int x,
int y,
int anchor) |
void |
drawString(java.lang.String str,
int x,
int y,
int anchor,
boolean inverted) |
void |
drawSubstring(java.lang.String str,
int offset,
int len,
int x,
int y,
int anchor) |
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle) |
void |
fillRect(int x,
int y,
int width,
int height) |
void |
flush()
Write LCD with current context
|
byte[] |
getDisplay() |
java.awt.Font |
getFont() |
JavaFramebuffer |
getFramebuffer() |
int |
getHeight() |
byte[] |
getHWDisplay() |
static GraphicsLCD |
getInstance() |
int |
getPixel(int x,
int y) |
int |
getStrokeStyle() |
int |
getTranslateX() |
int |
getTranslateY() |
int |
getWidth() |
private java.awt.image.BufferedImage |
java_lejos_flip(java.awt.image.BufferedImage in,
java.awt.image.BufferedImage out) |
private java.awt.image.BufferedImage |
lejos2rgb(byte[] src,
int width,
int height)
Convert from leJOS image format to Java image
|
void |
refresh() |
void |
setAutoRefresh(boolean b) |
int |
setAutoRefreshPeriod(int i) |
void |
setColor(int rgb)
Set RGB value
|
void |
setColor(int r,
int g,
int b) |
void |
setContrast(int i) |
void |
setFont(java.awt.Font font) |
void |
setPixel(int x,
int y,
int color) |
void |
setStrokeStyle(int i) |
private void |
timerUpdate() |
void |
translate(int x,
int y) |
detect, getIntegerAttribute, getStringAttribute, setIntegerAttribute, setStringAttribute
public static final java.lang.String EV3DEV_LCD_KEY
public static final java.lang.String EV3DEV_LCD_DEFAULT
public static final java.lang.String EV3DEV_LCD_MODE_KEY
private static final Logger log
private JavaFramebuffer fb
private java.awt.image.BufferedImage image
private java.awt.Graphics2D g2d
private java.util.Timer timer
private boolean timer_run
private int timer_msec
private int stroke
private static LCDStretch instance
public static GraphicsLCD getInstance()
public JavaFramebuffer getFramebuffer()
public void flush()
public void translate(int x, int y)
public java.awt.Font getFont()
public void setFont(java.awt.Font font)
public int getTranslateX()
public int getTranslateY()
public void setColor(int rgb)
rgb
- public void setColor(int r, int g, int b)
public void setPixel(int x, int y, int color)
public int getPixel(int x, int y)
public void drawString(java.lang.String str, int x, int y, int anchor, boolean inverted)
public void drawString(java.lang.String str, int x, int y, int anchor)
public void drawSubstring(java.lang.String str, int offset, int len, int x, int y, int anchor)
public void drawChar(char character, int x, int y, int anchor)
public void drawChars(char[] data, int offset, int length, int x, int y, int anchor)
public int getStrokeStyle()
public void setStrokeStyle(int i)
public void drawRegionRop(java.awt.Image src, int sx, int sy, int w, int h, int x, int y, int anchor, int rop)
public void drawRegionRop(java.awt.Image src, int sx, int sy, int w, int h, int transform, int x, int y, int anchor, int rop)
public void drawRegion(java.awt.Image src, int sx, int sy, int w, int h, int transform, int x, int y, int anchor)
public void drawImage(java.awt.Image image, int i, int i1, int i2)
public void drawLine(int x1, int y1, int x2, int y2)
public void fillRect(int x, int y, int width, int height)
public void copyArea(int sx, int sy, int w, int h, int x, int y, int anchor)
private int adjustX(int x, int w, int anchor)
private int adjustY(int y, int h, int anchor)
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
public void drawRect(int x, int y, int width, int height)
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
public void refresh()
public void clear()
public int getWidth()
public int getHeight()
public byte[] getDisplay()
public byte[] getHWDisplay()
public void setContrast(int i)
private java.awt.image.BufferedImage lejos2rgb(byte[] src, int width, int height)
private java.awt.image.BufferedImage any2rgb(java.awt.Image img)
private byte[] any2lejos(java.awt.image.BufferedImage img)
private java.awt.image.BufferedImage java_lejos_flip(java.awt.image.BufferedImage in, java.awt.image.BufferedImage out)
public void bitBlt(byte[] src, int sw, int sh, int sx, int sy, int dx, int dy, int w, int h, int rop)
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)
private void bitBlt(java.awt.image.BufferedImage src, int sx, int sy, java.awt.image.BufferedImage dst, int dx, int dy, int w, int h, int rop)
public void setAutoRefresh(boolean b)
public int setAutoRefreshPeriod(int i)
private void timerUpdate()