use of javax.microedition.lcdui.Graphics in project qrcode by yanbe.
the class J2MEImage method drawCross.
public void drawCross(Point point, int color) {
Image bufImage = Image.createImage(image.getWidth(), image.getHeight());
Graphics g = bufImage.getGraphics();
g.drawImage(image, 0, 0, 0);
g.setColor(color);
g.drawLine(point.getX() - 5, point.getY(), point.getX() + 5, point.getY());
g.drawLine(point.getX(), point.getY() - 5, point.getX(), point.getY() + 5);
image = bufImage;
repaint();
}
Aggregations