Java Draw Circle drawCircle5(Graphics g, int x, int y)

Here you can find the source of drawCircle5(Graphics g, int x, int y)

Description

draw Circle

License

Open Source License

Declaration

static public void drawCircle5(Graphics g, int x, int y) 

Method Source Code


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

import java.awt.*;

public class Main {

    static public void drawCircle5(Graphics g, int x, int y) {
        if (!(g instanceof Graphics2D)) {
            g.drawOval(x - 2, y - 2, 4, 4);
            return;
        }/*from  w w w.  j a  v  a2s.c  o m*/
        g.drawLine(x - 2, y - 1, x - 2, y + 1);
        g.drawLine(x + 2, y - 1, x + 2, y + 1);
        g.drawLine(x - 1, y - 2, x + 1, y - 2);
        g.drawLine(x - 1, y + 2, x + 1, y + 2);
    }
}

Related

  1. drawCircle(Graphics g, int centerX, int centerY, int diameter)
  2. drawCircle(Graphics g, int x, int y, int diameter)
  3. drawCircle(Graphics2D g2d, int x, int y, int size)
  4. drawCircle(Graphics2D graphics, double x, double y, double radius)
  5. drawCircle(int x, int y, int radius, Graphics2D graphics2D)
  6. drawStatesInCircle(Graphics2D g2d, int x, int y, int width, int height, Color... stateColors)