Skip to content

Commit

Permalink
(#20) Added examples
Browse files Browse the repository at this point in the history
- polygon2d - Creating Polygon2D objects
- text2d - Creating Text2D objects
- model2d - Creating Model2D objects
- modelreadwrite - Reading & Writing Model2D objects
- logging - FastJ logging
- fastjengineconfig - FastJEngine Configuration
  • Loading branch information
lucasstarsz committed Jun 6, 2021
1 parent 2475068 commit b3634ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/example/java/tech/fastj/example/model2d/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/example/java/tech/fastj/example/polygon2d/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b3634ad

Please sign in to comment.