Search in sources :

Example 6 with Graphics

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();
}
Also used : Graphics(javax.microedition.lcdui.Graphics) QRCodeImage(jp.sourceforge.qrcode.data.QRCodeImage) Image(javax.microedition.lcdui.Image)

Aggregations

Graphics (javax.microedition.lcdui.Graphics)6 Image (javax.microedition.lcdui.Image)6 QRCodeImage (jp.sourceforge.qrcode.data.QRCodeImage)6 Point (jp.sourceforge.qrcode.geom.Point)4