Here you can find the source of DrawCross(BufferedImage bi, Point pt)
public static void DrawCross(BufferedImage bi, Point pt)
//package com.java2s; // LICENSE: This file is distributed under the BSD license. import java.awt.Point; import java.awt.image.BufferedImage; public class Main { public static void DrawCross(BufferedImage bi, Point pt) { final int max_r = 50, min_r = 10, color = 0xffffff; for (int x = pt.x - max_r; x < pt.x - min_r; x++) { if (x >= 0 && x < bi.getWidth()) bi.setRGB(x, pt.y, color); }// w ww.j a v a 2 s.c o m for (int x = pt.x + min_r; x < pt.x + max_r; x++) { if (x >= 0 && x < bi.getWidth()) bi.setRGB(x, pt.y, color); } for (int y = pt.y - max_r; y < pt.y - min_r; y++) { if (y >= 0 && y < bi.getHeight()) bi.setRGB(pt.x, y, color); } for (int y = pt.y + min_r; y < pt.y + max_r; y++) { if (y >= 0 && y < bi.getHeight()) bi.setRGB(pt.x, y, color); } } }