Graphic Rendering System 1.0
A Java-based graphic rendering system implementing various design patterns
Loading...
Searching...
No Matches
MockThirdPartyRenderer.java
Go to the documentation of this file.
1package com.example.graphics.adapter;
2
8 @Override
9 public void drawCircle(double centerX, double centerY, double radius) {
10 System.out.println("ThirdParty: Drawing circle at (" + centerX + "," + centerY +
11 ") with radius " + radius);
12 }
13
14 @Override
15 public void drawRect(double x, double y, double width, double height) {
16 System.out.println("ThirdParty: Drawing rectangle at (" + x + "," + y +
17 ") with width " + width + " and height " + height);
18 }
19
20 @Override
21 public void drawLine(double startX, double startY, double endX, double endY) {
22 System.out.println("ThirdParty: Drawing line from (" + startX + "," + startY +
23 ") to (" + endX + "," + endY + ")");
24 }
25
26 @Override
27 public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints) {
28 System.out.print("ThirdParty: Drawing polygon with points: ");
29 for (int i = 0; i < nPoints; i++) {
30 System.out.print("(" + xPoints[i] + "," + yPoints[i] + ")");
31 if (i < nPoints - 1) {
32 System.out.print(", ");
33 }
34 }
35 System.out.println();
36 }
37
38 @Override
39 public void clearSurface() {
40 System.out.println("ThirdParty: Clearing surface");
41 }
42
43 @Override
44 public void refreshDisplay() {
45 System.out.println("ThirdParty: Refreshing display");
46 }
47}
void drawLine(double startX, double startY, double endX, double endY)
void drawRect(double x, double y, double width, double height)
void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
void drawCircle(double centerX, double centerY, double radius)