All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mmb.engine.java2d.GraphicsUtil Maven / Gradle / Ivy

Go to download

Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world. THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<

There is a newer version: 0.6
Show newest version
/**
 * 
 */
package mmb.engine.java2d;

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

/**
 * @author oskar
 *
 */
public class GraphicsUtil {
	private GraphicsUtil() {}
	
	public static void crossedBox(int x, int y, int w, int h, Color c, Graphics g) {
		g.setColor(c);
		g.drawRect(x, y, w, h);
		g.drawLine(x, y, x+w, y+h);
		g.drawLine(x+w, y, x, y+h);
	}
	public static void filledCrossedBox(int x, int y, int w, int h, Color fill, Color line, Graphics g) {
		g.setColor(fill);
		g.fillRect(x, y, w, h);
		crossedBox(x, y, w, h, line, g);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy