Graphic Rendering System 1.0
A Java-based graphic rendering system implementing various design patterns
Loading...
Searching...
No Matches
com.example.graphics.model.Circle Class Reference
Inheritance diagram for com.example.graphics.model.Circle:
Inheritance graph
Collaboration diagram for com.example.graphics.model.Circle:
Collaboration graph

Public Member Functions

 Circle (int x, int y, int radius)
void accept (ShapeVisitor visitor)
Shape clone ()
int getRadius ()
int getX ()
int getY ()
void setPosition (int x, int y)
void setRadius (int radius)

Private Attributes

int radius
int x
int y

Detailed Description

Circle implementation of the Shape interface.

Definition at line 8 of file Circle.java.

Constructor & Destructor Documentation

◆ Circle()

com.example.graphics.model.Circle.Circle ( int x,
int y,
int radius )
inline

Constructs a circle with the specified parameters

Parameters
xthe x coordinate of the center
ythe y coordinate of the center
radiusthe radius of the circle

Definition at line 19 of file Circle.java.

References radius, x, and y.

Referenced by clone().

Here is the caller graph for this function:

Member Function Documentation

◆ accept()

void com.example.graphics.model.Circle.accept ( ShapeVisitor visitor)
inline

Accept method for the Visitor pattern

Parameters
visitorthe visitor to accept

Implements com.example.graphics.model.Shape.

Definition at line 58 of file Circle.java.

◆ clone()

Shape com.example.graphics.model.Circle.clone ( )
inline

Clone the shape

Returns
a clone of this shape

Implements com.example.graphics.model.Shape.

Definition at line 63 of file Circle.java.

References Circle().

Here is the call graph for this function:

◆ getRadius()

◆ getX()

◆ getY()

◆ setPosition()

void com.example.graphics.model.Circle.setPosition ( int x,
int y )
inline

Set the position of the shape

Parameters
xthe x coordinate
ythe y coordinate

Implements com.example.graphics.model.Shape.

Definition at line 36 of file Circle.java.

References x, and y.

◆ setRadius()

void com.example.graphics.model.Circle.setRadius ( int radius)
inline

Set the radius of the circle

Parameters
radiusthe new radius

Definition at line 53 of file Circle.java.

References radius.

Member Data Documentation

◆ radius

int com.example.graphics.model.Circle.radius
private

Definition at line 11 of file Circle.java.

Referenced by Circle(), getRadius(), and setRadius().

◆ x

int com.example.graphics.model.Circle.x
private

Definition at line 9 of file Circle.java.

Referenced by Circle(), getX(), and setPosition().

◆ y

int com.example.graphics.model.Circle.y
private

Definition at line 10 of file Circle.java.

Referenced by Circle(), getY(), and setPosition().


The documentation for this class was generated from the following file: