Skip to content

Commit

Permalink
add missing javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rdeisenroth committed Aug 3, 2024
1 parent c03f7bf commit aa0f5bc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/fopbot/PaintUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public static Point getBoardSize(final KarelWorld world) {
*
* @param inputImage the image to load
* @param rotationOffset the rotation offset in degree
* @param targetSize the target size of the image
* @return the loaded image
*/
public static BufferedImage loadFieldImage(
Expand Down Expand Up @@ -87,6 +88,7 @@ public static BufferedImage loadFieldImage(
*
* @param inputImage the image to load, scale and rotate
* @param upRotationOffset the rotation offset in degree
* @param targetSize the target size of the image
* @return the loaded, scaled and rotated image.
*/
public static BufferedImage[] loadScaleRotateFieldImage(
Expand Down Expand Up @@ -211,7 +213,8 @@ public static AffineTransform getPanelWorldTransform(final GuiPanel panel) {
/**
* Returns the coordinates of the field the mouse is currently pointing at.
*
* @param panel the panel
* @param panel the panel
* @param mousePosition the mouse position
* @return the coordinates of the field the mouse is currently pointing at
*/
public static Point getMouseTilePosition(final GuiPanel panel, final Point mousePosition) {
Expand All @@ -225,6 +228,12 @@ public static Point getMouseTilePosition(final GuiPanel panel, final Point mouse
return new Point((int) point.getX(), (int) point.getY());
}

/**
* Converts a point to a point2D.
*
* @param point the point to convert
* @return the point2D
*/
public static Point2D toPoint2D(final Point point) {
return new Point2D.Double(point.getX(), point.getY());
}
Expand Down

0 comments on commit aa0f5bc

Please sign in to comment.