Java Graphics Draw paintCross(Graphics g, Color color, int centerX, int centerY, int size, int width)

Here you can find the source of paintCross(Graphics g, Color color, int centerX, int centerY, int size, int width)

Description

paint Cross

License

Open Source License

Declaration

public static void paintCross(Graphics g, Color color,
                int centerX, int centerY, int size, int width)
        

Method Source Code

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

import java.awt.Color;

import java.awt.Graphics;

public class Main {
    public static void paintCross(Graphics g, Color color, int centerX,
            int centerY, int size, int width)
    /*      */{//from w  w  w  .jav a  2 s.co  m
        /*  257 */g.setColor(color);
        /*  258 */size /= 2;
        /*  259 */for (int i = 0; i < width; i++) {
            /*  260 */g.drawLine(centerX - size, centerY - size, centerX
                    + size, centerY + size);
            /*  261 */g.drawLine(centerX + size, centerY - size, centerX
                    - size, centerY + size);
            /*  262 */centerX++;
            /*      */}
        /*      */}
}

Related

  1. paint3DRectEffect(Graphics graphics, int x, int y, int width, int height)
  2. paint3DRoundRectEffect(Graphics g, int x, int y, int width, int height, int radius)
  3. paintBall(Graphics2D g2, Color c)
  4. paintColorImageFromAlphaImage(Image alphaImage, Image out, Color color)
  5. paintComponent(Graphics g, Component c, Container p, Rectangle r)
  6. paintFilthyPanel(Graphics g, int width, int height)
  7. paintFocus(Graphics g, int x, int y, int width, int height, int r1, int r2, float grosor, Color color)
  8. paintKnurl3(java.awt.Graphics g2, float x, float y, float width, float height)
  9. paintLine(Graphics2D g2, Point2D.Double from, Point2D.Double to)