diff options
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/context/GraphicsContext.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/context/GraphicsContext.java b/src/main/java/fr/umlv/java/wallj/context/GraphicsContext.java index 2eaa3b4..f2ae0a6 100644 --- a/src/main/java/fr/umlv/java/wallj/context/GraphicsContext.java +++ b/src/main/java/fr/umlv/java/wallj/context/GraphicsContext.java | |||
@@ -33,7 +33,7 @@ public final class GraphicsContext { | |||
33 | } | 33 | } |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * @return the screen informations | 36 | * @return the screen information |
37 | */ | 37 | */ |
38 | public ScreenInfo getScreenInfo() { | 38 | public ScreenInfo getScreenInfo() { |
39 | return screenInfo; | 39 | return screenInfo; |
@@ -60,8 +60,14 @@ public final class GraphicsContext { | |||
60 | graphics2D.fillRect(Math.round(position.x), Math.round(position.y), Math.round(width), Math.round(height)); | 60 | graphics2D.fillRect(Math.round(position.x), Math.round(position.y), Math.round(width), Math.round(height)); |
61 | } | 61 | } |
62 | 62 | ||
63 | public void paintString(Color color, Vec2 position, String string){ | 63 | /** |
64 | * | ||
65 | * @param color the color of the text | ||
66 | * @param position the position that is given by the baseline's left point of the text | ||
67 | * @param string the text to write down on the screen | ||
68 | */ | ||
69 | public void paintString(Color color, Vec2 position, String string) { | ||
64 | graphics2D.setColor(color); | 70 | graphics2D.setColor(color); |
65 | graphics2D.drawString(string,position.x, position.y); | 71 | graphics2D.drawString(string, position.x, position.y); |
66 | } | 72 | } |
67 | } | 73 | } |