Java Draw Point drawPoint(final java.awt.Graphics g, final int x, final int y)

Here you can find the source of drawPoint(final java.awt.Graphics g, final int x, final int y)

Description

draw Point

License

Open Source License

Declaration

static public final void drawPoint(final java.awt.Graphics g, final int x, final int y) 

Method Source Code

//package com.java2s;
/**//  w  ww .j av a 2  s  .  c o  m
    
TrakEM2 plugin for ImageJ(C).
Copyright (C) 2005-2009 Albert Cardona and Rodney Douglas.
    
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation (http://www.gnu.org/licenses/gpl.txt )
    
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
    
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    
You may contact Albert Cardona at acardona at ini.phys.ethz.ch
Institute of Neuroinformatics, University of Zurich / ETH, Switzerland.
    
*/

import java.awt.Color;

public class Main {
    static public final void drawPoint(final java.awt.Graphics g, final int x, final int y) {
        g.setColor(Color.white);
        g.drawLine(x - 4, y + 2, x + 8, y + 2);
        g.drawLine(x + 2, y - 4, x + 2, y + 8);
        g.setColor(Color.yellow);
        g.fillRect(x + 1, y + 1, 3, 3);
        g.setColor(Color.black);
        g.drawRect(x, y, 4, 4);
    }
}

Related

  1. drawPoint(Graphics g, int x, int y)