Class PaintUtil
- java.lang.Object
-
- net.eternalclient.api.utilities.paint.PaintUtil
-
public class PaintUtil extends java.lang.Object
Utility class for drawing various shapes and text with specified colors.
-
-
Constructor Summary
Constructors Constructor Description PaintUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
drawClickbox(java.awt.Graphics2D gg, GameObject gameObject)
Draws the clickbox of a game object using the specified graphics context.static void
drawConvexHull(java.awt.Graphics2D gg, Entity entity)
Draws the convex hull of the given entity on the provided graphics context.static void
drawConvexHullOnScreen(java.awt.Graphics2D gg, Entity entity)
Draws the convex hull of an entity on the screen using the provided Graphics2D object.static void
drawMinimapDot(java.awt.Graphics2D gg, java.awt.Point point, java.awt.Color color)
Draws a minimap dot at the specified point with the given color.static void
drawMinimapDot(java.awt.Graphics2D gg, net.eternalclient.api.data.Point point, java.awt.Color color)
Draws a minimap dot at the specified point with the given color.static void
drawPoly(java.awt.Graphics2D gg, java.awt.Polygon poly, java.awt.Color color)
Draws a polygon with the given color onto the specified Graphics2D object.static void
drawPolygons(java.awt.Graphics2D gg, Entity entity)
Draws the polygons of the given entity using the specified Graphics2D object.static void
drawPolygonsOnScreen(java.awt.Graphics2D gg, Entity entity)
Draws the polygons associated with the given entity on the screen using the provided Graphics2D.static void
drawRect(java.awt.Graphics2D gg, java.awt.Rectangle rectangle)
Draws a rectangle with the specified border and filler colors using the provided Graphics2D object.static void
drawStringWithOutline(java.awt.Graphics2D graphics2D, java.lang.String inputString, int stringCenterX, int stringCenterY)
Draws the input string with an outline onto the graphics context at the specified center coordinates.static void
drawStringWithOutline(java.awt.Graphics2D graphics2D, java.lang.String inputString, java.awt.Point point)
Draws a string with an outline on the provided graphics object at the specified point.static void
drawStringWithOutline(java.awt.Graphics2D graphics2D, java.lang.String inputString, net.eternalclient.api.data.Point point)
Draws a string with an outline on the provided graphics object at the specified point.static void
drawStringWithShadow(java.awt.Graphics2D graphics2D, java.lang.String inputString, java.awt.Point point)
Draws a string with a shadow effect on the given Graphics2D object at the specified position.static void
drawStringWithShadow(java.awt.Graphics2D graphics2D, java.lang.String inputString, net.eternalclient.api.data.Point point)
Draws a string with a shadow effect on the given Graphics2D object at the specified position.static int
getStringCenterX(java.awt.Graphics2D graphics2D, int centerX, java.lang.String inputString)
Calculates the x-coordinate of the center point for a given string, relative to a specified x-coordinate.static int
getStringCenterY(java.awt.Graphics2D graphics2D, int centerY)
Calculates the y-coordinate of the center of a string based on the specified graphics context and center y-coordinate.
-
-
-
Method Detail
-
drawClickbox
public static void drawClickbox(java.awt.Graphics2D gg, GameObject gameObject)
Draws the clickbox of a game object using the specified graphics context.- Parameters:
gg
- the graphics context to draw ongameObject
- the game object whose clickbox should be drawn
-
drawPolygons
public static void drawPolygons(java.awt.Graphics2D gg, Entity entity)
Draws the polygons of the given entity using the specified Graphics2D object.- Parameters:
gg
- the Graphics2D object used for drawingentity
- the entity containing the polygons to be drawn
-
drawPolygonsOnScreen
public static void drawPolygonsOnScreen(java.awt.Graphics2D gg, Entity entity)
Draws the polygons associated with the given entity on the screen using the provided Graphics2D.- Parameters:
gg
- the Graphics2D object used for drawingentity
- the entity whose polygons need to be drawn
-
drawConvexHull
public static void drawConvexHull(java.awt.Graphics2D gg, Entity entity)
Draws the convex hull of the given entity on the provided graphics context.- Parameters:
gg
- the Graphics2D object to draw onentity
- the entity whose convex hull will be drawn
-
drawConvexHullOnScreen
public static void drawConvexHullOnScreen(java.awt.Graphics2D gg, Entity entity)
Draws the convex hull of an entity on the screen using the provided Graphics2D object.- Parameters:
gg
- the Graphics2D object used for drawingentity
- the entity whose convex hull is to be drawn
-
drawRect
public static void drawRect(java.awt.Graphics2D gg, java.awt.Rectangle rectangle)
Draws a rectangle with the specified border and filler colors using the provided Graphics2D object.- Parameters:
gg
- the Graphics2D object used for drawingrectangle
- the rectangle to be drawn
-
drawPoly
public static void drawPoly(java.awt.Graphics2D gg, java.awt.Polygon poly, java.awt.Color color)
Draws a polygon with the given color onto the specified Graphics2D object.- Parameters:
gg
- the Graphics2D object to draw onpoly
- the polygon to be drawncolor
- the color to use for drawing
-
drawMinimapDot
public static void drawMinimapDot(java.awt.Graphics2D gg, java.awt.Point point, java.awt.Color color)
Draws a minimap dot at the specified point with the given color.- Parameters:
gg
- the Graphics2D object used for renderingpoint
- the coordinates of the dot on the minimapcolor
- the color of the dot
-
drawMinimapDot
public static void drawMinimapDot(java.awt.Graphics2D gg, net.eternalclient.api.data.Point point, java.awt.Color color)
Draws a minimap dot at the specified point with the given color.- Parameters:
gg
- the Graphics2D object used for renderingpoint
- the coordinates of the dot on the minimapcolor
- the color of the dot
-
drawStringWithShadow
public static void drawStringWithShadow(java.awt.Graphics2D graphics2D, java.lang.String inputString, java.awt.Point point)
Draws a string with a shadow effect on the given Graphics2D object at the specified position.- Parameters:
graphics2D
- the Graphics2D object to draw oninputString
- the string to be drawnpoint
- the position to draw the string
-
drawStringWithShadow
public static void drawStringWithShadow(java.awt.Graphics2D graphics2D, java.lang.String inputString, net.eternalclient.api.data.Point point)
Draws a string with a shadow effect on the given Graphics2D object at the specified position.- Parameters:
graphics2D
- the Graphics2D object to draw oninputString
- the string to be drawnpoint
- the position to draw the string
-
drawStringWithOutline
public static void drawStringWithOutline(java.awt.Graphics2D graphics2D, java.lang.String inputString, int stringCenterX, int stringCenterY)
Draws the input string with an outline onto the graphics context at the specified center coordinates.- Parameters:
graphics2D
- the graphics context to draw oninputString
- the string to be drawnstringCenterX
- the x-coordinate of the string centerstringCenterY
- the y-coordinate of the string center
-
drawStringWithOutline
public static void drawStringWithOutline(java.awt.Graphics2D graphics2D, java.lang.String inputString, java.awt.Point point)
Draws a string with an outline on the provided graphics object at the specified point.- Parameters:
graphics2D
- the graphics object to draw oninputString
- the string to drawpoint
- the coordinates of the starting point
-
drawStringWithOutline
public static void drawStringWithOutline(java.awt.Graphics2D graphics2D, java.lang.String inputString, net.eternalclient.api.data.Point point)
Draws a string with an outline on the provided graphics object at the specified point.- Parameters:
graphics2D
- the graphics object to draw oninputString
- the string to drawpoint
- the coordinates of the starting point
-
getStringCenterX
public static int getStringCenterX(java.awt.Graphics2D graphics2D, int centerX, java.lang.String inputString)
Calculates the x-coordinate of the center point for a given string, relative to a specified x-coordinate.- Parameters:
graphics2D
- the graphics context for rendering the stringcenterX
- the x-coordinate of the center pointinputString
- the string to be centered- Returns:
- the x-coordinate of the center point for the string
-
getStringCenterY
public static int getStringCenterY(java.awt.Graphics2D graphics2D, int centerY)
Calculates the y-coordinate of the center of a string based on the specified graphics context and center y-coordinate.- Parameters:
graphics2D
- the graphics context used for drawingcenterY
- the y-coordinate of the center- Returns:
- the calculated y-coordinate of the center of the string
-
-