/*
* 18:06:08
* vjanssen
*/
package a0902d_f_Philosophen_VORLAGE;

import java.awt.Color;
import java.awt.Graphics;

public class AF_Kreis extends AbsForm
{
	public AF_Kreis()
	{
		this(1, 1, 1, Color.BLACK);
	}
	
	public AF_Kreis(int x, int y, int laenge, Color farbe)
	{
		super(x, y, laenge, farbe);
	}

	
	public void drawObjekt(Graphics g, int xVer, int yVer)
	{
		double l = (double) this.getLaenge();
		double r = l / 2.0d;
		
		int x = this.getX() + xVer - (int) r;
		int y = this.getY() + yVer - (int) r;
		int b = (int) l;
		
		g.setColor(this.getFarbe());
		g.fillOval(x, y, b, b);
		
		if (TESTMODUS)
		{
			g.setColor(Color.BLACK);
			g.drawString("x: " + this.getX(), x, y+b+11);
			g.drawString("y: " + this.getY(), x, y+b+21);
		}
	}
}
