Here you can find the source of drawTankISPip(Graphics2D g2d, int width, int height)
public static void drawTankISPip(Graphics2D g2d, int width, int height)
//package com.java2s; /*//from ww w. j a v a 2 s .c o m * MegaMekLab - Copyright (C) 2010 * * Original author - jtighe (torren@users.sourceforge.net) * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. */ import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; public class Main { public static void drawTankISPip(Graphics2D g2d, int width, int height) { Dimension circle = new Dimension(7, 7); Dimension fillCircle = new Dimension(5, 5); g2d.setColor(Color.black); g2d.fillOval(width, height, circle.width, circle.height); g2d.setColor(Color.white); g2d.fillOval(width + 1, height + 1, fillCircle.width, fillCircle.height); } public static void drawTankISPip(Graphics2D g2d, float width, float height) { g2d.setColor(Color.black); Ellipse2D.Float circle = new Ellipse2D.Float(width, height, 6f, 6f); g2d.fill(circle); g2d.setColor(Color.white); circle = new Ellipse2D.Float(width + 1, height + 1, 4, 4); g2d.fill(circle); } }