Package sk.tuke.kpi.gamelib.graphics
Class BatchOverlay
- java.lang.Object
-
- sk.tuke.kpi.gamelib.graphics.BatchOverlay
-
-
Constructor Summary
Constructors Constructor Description BatchOverlay(@NotNull com.badlogic.gdx.graphics.g2d.Batch batch)
BatchOverlay(@NotNull com.badlogic.gdx.graphics.g2d.Batch batch, @Nullable com.badlogic.gdx.graphics.Camera camera)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull OverlayDrawing<?>
drawAnimation(@NotNull Animation animation, int x, int y)
Drawsanimation
at [x, y].@NotNull OverlayDrawing<?>
drawAnimation(@NotNull Animation animation, int x, int y, float scale)
Drawsanimation
at [x, y], scaled at scale.@NotNull OverlayDrawing<?>
drawAnimation(@NotNull Animation animation, int x, int y, float scale, float rotation)
Drawsanimation
at [x, y], scaled at scale and rotated at rotation degrees.@NotNull OverlayDrawing<?>
drawLine(int x1, int y1, int x2, int y2, @NotNull Color color)
Draws line from point [x1, y1] to point [x2, y2] with color.@NotNull OverlayDrawing<?>
drawRectangle(int x, int y, int width, int height, @NotNull Color color)
Draws rectangle with bottom left corner at [x, y] of specified width and height.@NotNull OverlayDrawing<?>
drawRectangle(int x, int y, int width, int height, @NotNull Color color, float borderWidth, @NotNull Color borderColor)
Draws rectangle with bottom left corner at [x, y] of specified width and height.@NotNull OverlayDrawing<?>
drawText(@NotNull java.lang.String text, int x, int y)
Draws a text string at [x, y] with default font.@NotNull OverlayDrawing<?>
drawText(@NotNull java.lang.String text, int x, int y, @NotNull Font font)
Draws a text string at [x, y] with font.@NotNull OverlayDrawing<?>
drawText(@NotNull java.lang.String text, int x, int y, @NotNull Font font, float rotation)
Draws a text string at [x, y] with font, rotated at rotation degrees.@NotNull OverlayDrawing<?>
drawTextLayout(@NotNull TextLayout textLayout, int x, int y)
Draws a pre-renderedtext layout
at [x, y].@NotNull OverlayDrawing<?>
drawTextLayout(@NotNull TextLayout textLayout, int x, int y, float rotation)
Draws a pre-renderedtext layout
at [x, y] rotated at rotation degrees.void
render(float deltaTime)
Renders the overlay layer.
-
-
-
Method Detail
-
drawLine
@NotNull public @NotNull OverlayDrawing<?> drawLine(int x1, int y1, int x2, int y2, @NotNull @NotNull Color color)
Description copied from interface:Overlay
Draws line from point [x1, y1] to point [x2, y2] with color.
-
drawRectangle
@NotNull public @NotNull OverlayDrawing<?> drawRectangle(int x, int y, int width, int height, @NotNull @NotNull Color color)
Description copied from interface:Overlay
Draws rectangle with bottom left corner at [x, y] of specified width and height.- Specified by:
drawRectangle
in interfaceOverlay
color
- fill color.
-
drawRectangle
@NotNull public @NotNull OverlayDrawing<?> drawRectangle(int x, int y, int width, int height, @NotNull @NotNull Color color, float borderWidth, @NotNull @NotNull Color borderColor)
Description copied from interface:Overlay
Draws rectangle with bottom left corner at [x, y] of specified width and height.- Specified by:
drawRectangle
in interfaceOverlay
color
- fill color.borderWidth
- border line widthborderColor
- border line color
-
drawText
@NotNull public @NotNull OverlayDrawing<?> drawText(@NotNull @NotNull java.lang.String text, int x, int y)
Description copied from interface:Overlay
Draws a text string at [x, y] with default font.
-
drawText
@NotNull public @NotNull OverlayDrawing<?> drawText(@NotNull @NotNull java.lang.String text, int x, int y, @NotNull @NotNull Font font)
Description copied from interface:Overlay
Draws a text string at [x, y] with font.
-
drawText
@NotNull public @NotNull OverlayDrawing<?> drawText(@NotNull @NotNull java.lang.String text, int x, int y, @NotNull @NotNull Font font, float rotation)
Description copied from interface:Overlay
Draws a text string at [x, y] with font, rotated at rotation degrees.
-
drawTextLayout
@NotNull public @NotNull OverlayDrawing<?> drawTextLayout(@NotNull @NotNull TextLayout textLayout, int x, int y)
Description copied from interface:Overlay
Draws a pre-renderedtext layout
at [x, y].- Specified by:
drawTextLayout
in interfaceOverlay
-
drawTextLayout
@NotNull public @NotNull OverlayDrawing<?> drawTextLayout(@NotNull @NotNull TextLayout textLayout, int x, int y, float rotation)
Description copied from interface:Overlay
Draws a pre-renderedtext layout
at [x, y] rotated at rotation degrees.- Specified by:
drawTextLayout
in interfaceOverlay
-
drawAnimation
@NotNull public @NotNull OverlayDrawing<?> drawAnimation(@NotNull @NotNull Animation animation, int x, int y)
Description copied from interface:Overlay
Drawsanimation
at [x, y]. The animation is always rendered at its first frame.- Specified by:
drawAnimation
in interfaceOverlay
-
drawAnimation
@NotNull public @NotNull OverlayDrawing<?> drawAnimation(@NotNull @NotNull Animation animation, int x, int y, float scale)
Description copied from interface:Overlay
Drawsanimation
at [x, y], scaled at scale. The animation is always rendered at its first frame.- Specified by:
drawAnimation
in interfaceOverlay
-
drawAnimation
@NotNull public @NotNull OverlayDrawing<?> drawAnimation(@NotNull @NotNull Animation animation, int x, int y, float scale, float rotation)
Description copied from interface:Overlay
Drawsanimation
at [x, y], scaled at scale and rotated at rotation degrees. The animation is always rendered at its first frame.- Specified by:
drawAnimation
in interfaceOverlay
-
-