fi.jyu.mit.graphics
Class Circle

java.lang.Object
  extended by fi.jyu.mit.graphics.BasicShape
      extended by fi.jyu.mit.graphics.Circle
All Implemented Interfaces:
Drawable, Transformable

public class Circle
extends BasicShape
implements Drawable

Luokka ympyröille

Author:
Markus Kivioja

Constructor Summary
Circle(double x, double y, double r)
          Luo uuden ympyrän
Circle(double x, double y, double z, double r)
          Luo uuden ympyrän
 
Method Summary
protected  void drawShape(Graphics g, Matrix a)
          Piirretään ympyrä
 Circle setR(double r)
          Asetetaan ympyrälle uusi säde
 
Methods inherited from class fi.jyu.mit.graphics.BasicShape
changeTransform, draw, getColor, getPoint, getRotator, getRotator, getTransform, getTransform, initGraphics, move, redraw, rotate, scale, setColor, setColor, setParent, setRotator, setTransform, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.jyu.mit.graphics.Drawable
changeTransform, draw, getColor, move, redraw, rotate, scale, setColor, setColor, setParent, setTransform, transform
 
Methods inherited from interface fi.jyu.mit.graphics.Transformable
getRotator, getTransform, setRotator
 

Constructor Detail

Circle

public Circle(double x,
              double y,
              double r)
Luo uuden ympyrän

Parameters:
x - ympyrän keskipisteen x-koordinaatti
y - ympyrän keskipisteen y-koordinaatti
r - ympyrän säde

Circle

public Circle(double x,
              double y,
              double z,
              double r)
Luo uuden ympyrän

Parameters:
x - ympyrän keskipisteen x-koordinaatti
y - ympyrän keskipisteen y-koordinaatti
z - ympyrän keskipisteen z-koordinaatti
r - ympyrän säde
Method Detail

setR

public Circle setR(double r)
Asetetaan ympyrälle uusi säde

Parameters:
r - uusi säteen arvo
Returns:
tämä olio ketjuttamista varten

drawShape

protected void drawShape(Graphics g,
                         Matrix a)
Piirretään ympyrä

Specified by:
drawShape in class BasicShape
Parameters:
g - Graphics-olio
a - muunnosmatriisi
See Also:
BasicShape.drawShape(java.awt.Graphics, fi.jyu.mit.graphics.Matrix)