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

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

Description

Draw stage with sample

License

BSD License

Declaration

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

Method Source Code

//package com.java2s;
/***//ww w . j  av  a 2  s . co m
 * Copyright (C) 2010 Johan Henriksson
 * This code is under the Endrov / BSD license. See www.endrov.net
 * for the full text and how to cite.
 */

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

public class Main {
    /**
     * Draw stage with sample
     */
    public static void drawStage(Graphics g, int x, int y) {
        int dy = 6;
        int[] xPoints = new int[] { x - 20, x + 20, x + 25, x - 25 };
        int[] yPoints = new int[] { y - dy, y - dy, y + dy, y + dy };
        g.setColor(Color.GRAY);
        g.fillPolygon(xPoints, yPoints, 4);
        g.setColor(Color.BLACK);
        g.drawPolygon(xPoints, yPoints, 4);
    }
}

Related

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