Java Graphics Draw drawStar(Graphics g, int x, int y)

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

Description

draw Star

License

Open Source License

Declaration

static public void drawStar(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 drawStar(Graphics g, int x, int y) {
        g.drawLine(x, y - 3, x, y - 2);//from  w  w w  .j  a va  2 s .  c om
        g.drawLine(x - 1, y - 1, x + 1, y - 1);
        g.drawLine(x - 3, y, x + 3, y);
        g.drawLine(x - 2, y + 1, x + 2, y + 1);
        g.drawLine(x - 1, y + 2, x + 1, y + 2);
        g.drawLine(x - 2, y + 3, x - 2, y + 3);
        g.drawLine(x + 2, y + 3, x + 2, y + 3);
    }
}

Related

  1. drawSelectionPoint(Graphics g, Point p)
  2. drawSpline(Graphics graphics, int x1, int y1, int x2, int y2, int x3, int y3)
  3. drawSquarePoint(Graphics2D g2, Point2D.Double pt, int ptSize, Color color)
  4. drawStackTrace(Graphics gr, int x, int y, Throwable ex)
  5. drawStage(Graphics g, int x, int y)
  6. drawTankISPip(Graphics2D g2d, int width, int height)
  7. drawTransparent(Graphics g, int x, int y, int width, int height)
  8. drawUp(Graphics g, int x, int y, int w, int h)
  9. drawWeightBox(Graphics2D g2d, int ycentre, int xcentre, int width)