Skip to content

Commit

Permalink
Document units of Batch rotation (libgdx#7366)
Browse files Browse the repository at this point in the history
* Document units of Batch rotation

* Fix whitespace from GitHub editor

* Fix code style in Batch.java

* Remove a trailing whitespace
  • Loading branch information
soundasleep authored Mar 20, 2024
1 parent 312118b commit d3ec430
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gdx/src/com/badlogic/gdx/graphics/g2d/Batch.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public interface Batch extends Disposable {
* @param height the height in pixels
* @param scaleX the scale of the rectangle around originX/originY in x
* @param scaleY the scale of the rectangle around originX/originY in y
* @param rotation the angle of counter clockwise rotation of the rectangle around originX/originY
* @param rotation the angle of counter clockwise rotation of the rectangle around originX/originY, in degrees
* @param srcX the x-coordinate in texel space
* @param srcY the y-coordinate in texel space
* @param srcWidth the source with in texels
Expand Down Expand Up @@ -154,14 +154,16 @@ public void draw (Texture texture, float x, float y, float width, float height,
/** Draws a rectangle with the bottom left corner at x,y and stretching the region to cover the given width and height. The
* rectangle is offset by originX, originY relative to the origin. Scale specifies the scaling factor by which the rectangle
* should be scaled around originX, originY. Rotation specifies the angle of counter clockwise rotation of the rectangle around
* originX, originY. */
* originX, originY.
* @param rotation rotation in degrees */
public void draw (TextureRegion region, float x, float y, float originX, float originY, float width, float height,
float scaleX, float scaleY, float rotation);

/** Draws a rectangle with the texture coordinates rotated 90 degrees. The bottom left corner at x,y and stretching the region
* to cover the given width and height. The rectangle is offset by originX, originY relative to the origin. Scale specifies the
* scaling factor by which the rectangle should be scaled around originX, originY. Rotation specifies the angle of counter
* clockwise rotation of the rectangle around originX, originY.
* @param rotation rotation in degrees
* @param clockwise If true, the texture coordinates are rotated 90 degrees clockwise. If false, they are rotated 90 degrees
* counter clockwise. */
public void draw (TextureRegion region, float x, float y, float originX, float originY, float width, float height,
Expand Down

0 comments on commit d3ec430

Please sign in to comment.