Java BufferedImage Operation grid(BufferedImage image, int between)

Here you can find the source of grid(BufferedImage image, int between)

Description

grid

License

Open Source License

Declaration

public static void grid(BufferedImage image, int between) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Color;
import java.awt.Graphics;

import java.awt.image.BufferedImage;

public class Main {
    public static void grid(BufferedImage image, int between) {
        Graphics g = image.getGraphics();

        g.setColor(Color.gray.brighter());

        for (int x = 0; x < image.getWidth(); x += between) {
            g.drawRect(x, 0, 0, image.getHeight());
        }//from  w ww  . j  a v  a 2  s.c om

        for (int y = 0; y < image.getHeight(); y += between) {
            g.drawRect(0, y, image.getWidth(), 0);
        }
    }
}

Related

  1. generateBufferedImageFromComponent(Component component)
  2. generateImageHash(BufferedImage image)
  3. generateOutline(BufferedImage source, Color color, boolean alpha)
  4. gradientMask(BufferedImage img, float start, float stop)
  5. greyScale(BufferedImage image)
  6. height(BufferedImage image, Double measurementLatitude, Double measurementLongitude)
  7. highlight(BufferedImage img, Color source, Color dest)
  8. hitTest(BufferedImage image, int x, int y)
  9. hueShift(BufferedImage image, int hue)