Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PaintUtil

        public PaintUtil()
    • 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 on
        gameObject - 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 drawing
        entity - 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 drawing
        entity - 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 on
        entity - 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 drawing
        entity - 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 drawing
        rectangle - 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 on
        poly - the polygon to be drawn
        color - 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 rendering
        point - the coordinates of the dot on the minimap
        color - 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 rendering
        point - the coordinates of the dot on the minimap
        color - 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 on
        inputString - the string to be drawn
        point - 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 on
        inputString - the string to be drawn
        point - 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 on
        inputString - the string to be drawn
        stringCenterX - the x-coordinate of the string center
        stringCenterY - 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 on
        inputString - the string to draw
        point - 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 on
        inputString - the string to draw
        point - 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 string
        centerX - the x-coordinate of the center point
        inputString - 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 drawing
        centerY - the y-coordinate of the center
        Returns:
        the calculated y-coordinate of the center of the string