From b3634ad5691c58bef5b5b5bd4a615e1b4c3a360b Mon Sep 17 00:00:00 2001 From: lucasstarsz Date: Tue, 25 May 2021 00:11:00 -0400 Subject: [PATCH] (#20) Added examples - polygon2d - Creating Polygon2D objects - text2d - Creating Text2D objects - model2d - Creating Model2D objects - modelreadwrite - Reading & Writing Model2D objects - logging - FastJ logging - fastjengineconfig - FastJEngine Configuration --- src/example/java/tech/fastj/example/model2d/Main.java | 2 +- src/example/java/tech/fastj/example/polygon2d/Main.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/example/java/tech/fastj/example/model2d/Main.java b/src/example/java/tech/fastj/example/model2d/Main.java index 68967b70..149cefa1 100644 --- a/src/example/java/tech/fastj/example/model2d/Main.java +++ b/src/example/java/tech/fastj/example/model2d/Main.java @@ -3,7 +3,7 @@ import tech.fastj.engine.FastJEngine; import tech.fastj.math.Pointf; import tech.fastj.graphics.Display; -import tech.fastj.graphics.DrawUtil; +import tech.fastj.graphics.util.DrawUtil; import tech.fastj.graphics.game.Model2D; import tech.fastj.graphics.game.Polygon2D; diff --git a/src/example/java/tech/fastj/example/polygon2d/Main.java b/src/example/java/tech/fastj/example/polygon2d/Main.java index 97199ebe..d326c612 100644 --- a/src/example/java/tech/fastj/example/polygon2d/Main.java +++ b/src/example/java/tech/fastj/example/polygon2d/Main.java @@ -3,7 +3,7 @@ import tech.fastj.engine.FastJEngine; import tech.fastj.math.Pointf; import tech.fastj.graphics.Display; -import tech.fastj.graphics.DrawUtil; +import tech.fastj.graphics.util.DrawUtil; import tech.fastj.graphics.game.Polygon2D; import tech.fastj.systems.control.SimpleManager; @@ -51,7 +51,7 @@ public void init(Display display) { /* You can set the following properties of a Polygon2D: * - Mesh (Pointf[]) - * - Color + * - Paint (solid color, gradient) * - PaintFilled (render the outline or fill) * - Rotation * - Scale @@ -66,7 +66,7 @@ public void init(Display display) { * - Translated by (20, 10) */ Pointf[] largeSquareMesh = DrawUtil.createBox(625f, 25.5f, 47.9f); Polygon2D largeSquare = new Polygon2D(largeSquareMesh) - .setColor(Color.blue) + .setPaint(Color.blue) .setFilled(false); /* As you can see from the code above, many of the methods Polygon2D contains allow for