Java Graphics Draw drawCross(Graphics2D g2d, int x, int y, int size)

Here you can find the source of drawCross(Graphics2D g2d, int x, int y, int size)

Description

draw Cross

License

Open Source License

Declaration

public static void drawCross(Graphics2D g2d, int x, int y, int size) 

Method Source Code


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

import java.awt.*;

public class Main {
    public static void drawCross(Graphics2D g2d, int x, int y, int size) {
        g2d.drawLine(x, y, x + size, y + size);
        g2d.drawLine(x, y + size, x + size, y);
    }/* w w  w  .  ja  v a 2  s.co m*/
}

Related

  1. drawChars(JComponent c, Graphics g, char[] data, int offset, int length, int x, int y)
  2. drawCheck(Graphics g, int x, int y)
  3. drawCheckerPattern(Graphics g_, int checkerSize)
  4. drawColors(Color[] colors, Graphics g, int x1, int y1, int x2, int y2, int direction)
  5. drawCoordinateAxes(Graphics2D g, Component comp)
  6. drawCrosshatch(Graphics2D g, Color color, int left, int right, int top, int height, int spacing, int verticalOffset)
  7. drawCube(Graphics g, int x, int y, int w, int h, int d, float fac)
  8. drawDiamond(Graphics2D g2d, int xPos, int yPos)
  9. drawDisc(Graphics g)