Updated readability of the code.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / shapes / composite / textcanvas / TextCanvas.java
index fd78bf9..7a0c5e5 100644 (file)
@@ -8,7 +8,7 @@ import eu.svjatoslav.sixth.e3d.geometry.Point3D;
 import eu.svjatoslav.sixth.e3d.gui.RenderingContext;
 import eu.svjatoslav.sixth.e3d.gui.TextPointer;
 import eu.svjatoslav.sixth.e3d.math.Transform;
-import eu.svjatoslav.sixth.e3d.math.TransformsPipeline;
+import eu.svjatoslav.sixth.e3d.math.TransformsStack;
 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.TexturedRectangle;
 
@@ -22,7 +22,7 @@ import static eu.svjatoslav.sixth.e3d.renderer.raster.Color.WHITE;
 
 public class TextCanvas extends TexturedRectangle {
 
-    // character size in world coordiates
+    // character size in world coordinates
     public static final int FONT_CHAR_WIDTH = 8;
     public static final int FONT_CHAR_HEIGHT = 16;
 
@@ -36,7 +36,7 @@ public class TextCanvas extends TexturedRectangle {
     private static final String GROUP_CHARACTERS = "characters";
     private final TextPointer size;
     private final TextPointer cursorLocation = new TextPointer();
-    CanvasCharacter lines[][];
+    CanvasCharacter[][] lines;
     private RenderMode renderMode = null;
     private Color backgroundColor = BLACK;
     private Color foregroundColor = WHITE;
@@ -118,7 +118,7 @@ public class TextCanvas extends TexturedRectangle {
     }
 
     @Override
-    public void beforeTransformHook(final TransformsPipeline transformPipe,
+    public void beforeTransformHook(final TransformsStack transformPipe,
                                     final RenderingContext context) {
 
         final double textRelativeSize = context.width
@@ -145,7 +145,7 @@ public class TextCanvas extends TexturedRectangle {
             setRenderMode(RenderMode.CHARACTERS);
     }
 
-    public void cls() {
+    public void clear() {
         for (final CanvasCharacter[] line : lines)
             for (final CanvasCharacter character : line) {
                 character.setValue(' ');
@@ -295,11 +295,4 @@ public class TextCanvas extends TexturedRectangle {
                 character.setForegroundColor(color);
     }
 
-    // @Override
-    // public void transform(final TransformPipe transformPipe,
-    // final RenderAggregator aggregator, final RenderingContext buffer) {
-    //
-    // super.transform(transformPipe, aggregator, buffer);
-    //
-    // }
 }