GraphicsApp API
Eine überarbeitete und angepasste Variante der originalen GraphicsApp-Umgebung
de.ur.mi.oop.graphics.Rectangle Klassenreferenz
+ Klassendiagramm für de.ur.mi.oop.graphics.Rectangle:

Öffentliche Methoden

 Rectangle (float x, float y, float width, float height, Color color)
 
 Rectangle (float x, float y, float width, float height)
 
- Öffentliche Methoden geerbt von de.ur.mi.oop.graphics.GraphicsObject
 GraphicsObject (float x, float y, Color color)
 
 GraphicsObject (float x, float y)
 
 GraphicsObject (float x, float y, float width, float height, Color color)
 
 GraphicsObject (float x, float y, float width, float height, Color color, Color borderColor)
 
 GraphicsObject (Point point)
 
void draw ()
 
float getXPos ()
 
void setXPos (float xPos)
 
float getYPos ()
 
void setYPos (float yPos)
 
void setPosition (float xPos, float yPos)
 
float getWidth ()
 
float getHeight ()
 
void setWidth (float width)
 
void setHeight (float height)
 
float getTopBorder ()
 
float getBottomBorder ()
 
float getLeftBorder ()
 
float getRightBorder ()
 
Color getColor ()
 
void setColor (Color color)
 
void setBorderColor (Color color)
 
void setBorderWeight (float weight)
 
void setBorder (Color color, float weight)
 
float getBorderWeight ()
 
Color getBorderColor ()
 
GraphicsObjectType getType ()
 
void move (float dx, float dy)
 
boolean hitTest (float x, float y)
 
double distanceTo (GraphicsObject object)
 

Weitere Geerbte Elemente

- Geschützte Attribute geerbt von de.ur.mi.oop.graphics.GraphicsObject
float strokeWeight
 
GraphicsObjectType type
 
- Statische, geschützte Attribute geerbt von de.ur.mi.oop.graphics.GraphicsObject
static final Color DEFAULT_COLOR = Colors.RED
 
static final Color DEFAULT_BORDER_COLOR = Colors.BLACK
 

Ausführliche Beschreibung

Die Rectangle-Klasse ist ein grafisches Objekt, das ein Rechteck darstellt.

Definiert in Zeile 8 der Datei Rectangle.java.

Beschreibung der Konstruktoren und Destruktoren

◆ Rectangle() [1/2]

de.ur.mi.oop.graphics.Rectangle.Rectangle ( float  x,
float  y,
float  width,
float  height,
Color  color 
)

Konstruiert ein neues Rechteck mit der angegebenen Breite, Höhe, und Farbe, das an den Koordinaten x und y positioniert ist.

Parameter
xDie x-Position der linken oberen Ecke des Rechtecks.
yDie y-Position der linken oberen Ecke des Rechtecks.
widthDie Breite des Rechtecks in Pixel
heightDie Höhe des Rechtecks in Pixel
colorDie Hintergrundfarbe für das Rechteck

Definiert in Zeile 20 der Datei Rectangle.java.

◆ Rectangle() [2/2]

de.ur.mi.oop.graphics.Rectangle.Rectangle ( float  x,
float  y,
float  width,
float  height 
)

Konstruiert ein neues Rechteck mit der angegebenen Breite, Höhe, das an den Koordinaten x und y positioniert ist.

Parameter
xDie x-Position der linken oberen Ecke des Rechtecks.
yDie y-Position der linken oberen Ecke des Rechtecks.
widthDie Breite des Rechtecks in Pixel
heightDie Höhe des Rechtecks in Pixel

Definiert in Zeile 36 der Datei Rectangle.java.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: