Graphic Rendering System 1.0
A Java-based graphic rendering system implementing various design patterns
|
Public Member Functions | |
void | clearSurface () |
void | drawCircle (double centerX, double centerY, double radius) |
void | drawLine (double startX, double startY, double endX, double endY) |
void | drawPolygon (int[] xPoints, int[] yPoints, int nPoints) |
void | drawRect (double x, double y, double width, double height) |
void | refreshDisplay () |
Mock interface for a third-party rendering library. This represents an external API that we need to adapt.
Definition at line 7 of file ThirdPartyRenderer.java.
void com.example.graphics.adapter.ThirdPartyRenderer.clearSurface | ( | ) |
Clear the rendering surface
Implemented in com.example.graphics.adapter.MockThirdPartyRenderer.
void com.example.graphics.adapter.ThirdPartyRenderer.drawCircle | ( | double | centerX, |
double | centerY, | ||
double | radius ) |
Draw a circle in the third-party renderer
centerX | the x coordinate of the center |
centerY | the y coordinate of the center |
radius | the radius of the circle |
Implemented in com.example.graphics.adapter.MockThirdPartyRenderer.
void com.example.graphics.adapter.ThirdPartyRenderer.drawLine | ( | double | startX, |
double | startY, | ||
double | endX, | ||
double | endY ) |
Draw a line in the third-party renderer
startX | the x coordinate of the start point |
startY | the y coordinate of the start point |
endX | the x coordinate of the end point |
endY | the y coordinate of the end point |
Implemented in com.example.graphics.adapter.MockThirdPartyRenderer.
void com.example.graphics.adapter.ThirdPartyRenderer.drawPolygon | ( | int[] | xPoints, |
int[] | yPoints, | ||
int | nPoints ) |
Draw a polygon in the third-party renderer
xPoints | the x coordinates of the vertices |
yPoints | the y coordinates of the vertices |
nPoints | the number of vertices |
Implemented in com.example.graphics.adapter.MockThirdPartyRenderer.
void com.example.graphics.adapter.ThirdPartyRenderer.drawRect | ( | double | x, |
double | y, | ||
double | width, | ||
double | height ) |
Draw a rectangle in the third-party renderer
x | the x coordinate of the top-left corner |
y | the y coordinate of the top-left corner |
width | the width of the rectangle |
height | the height of the rectangle |
Implemented in com.example.graphics.adapter.MockThirdPartyRenderer.
void com.example.graphics.adapter.ThirdPartyRenderer.refreshDisplay | ( | ) |
Update the display
Implemented in com.example.graphics.adapter.MockThirdPartyRenderer.