Class Image.Circle

  • Enclosing class:
    Image

    public static class Image.Circle
    extends Image
    Class used to create the JSON for a Circle-shaped image.

    Supported options:

    • Set X position.
    • Set Y position.
    • Set color.
    • Set radius.
    • Constructor Detail

      • Circle

        public Circle()
    • Method Detail

      • withPosX

        public Image.Circle withPosX​(int posX)
        Sets the position on the X (horizontal) axis for the image.
        The value can be both negative and positive.
        Specified by:
        withPosX in class Image
        Parameters:
        posX - The positive, horizontal position of the image.
        Returns:
        The Circle instance. Useful for chaining.
      • withPosY

        public Image.Circle withPosY​(int posY)
        Sets the position on the Y (vertical) axis for the image.
        The value can be both negative and positive.
        Specified by:
        withPosY in class Image
        Parameters:
        posY - The positive, vertical position of the image.
        Returns:
        The Circle instance. Useful for chaining.
      • withWidth

        public Image.Circle withWidth​(int width)
        This method cannot be used in the Circle image type.
        Throws an IllegalArgumentException when called.

        Use withRadius(int) instead.

        Specified by:
        withWidth in class Image
        Parameters:
        width - The width of the image.
        Returns:
        Nothing.
      • withHeight

        public Image.Circle withHeight​(int height)
        This method cannot be used in the Circle image type.
        Throws an IllegalArgumentException when called.

        Use withRadius(int) instead.

        Specified by:
        withHeight in class Image
        Parameters:
        height - The height of the image.
        Returns:
        Nothing.
      • withColor

        public Image.Circle withColor​(@NotNull
                                      @NotNull ColorObject color)
        Sets the color to use for the image.
        Please see the documentation of the ColorObject for possible errors and limitations.
        Specified by:
        withColor in class Image
        Parameters:
        color - The ColorObject to use.
        Returns:
        The Circle instance. Useful for chaining.
      • withRadius

        public Image.Circle withRadius​(int radius)
        Sets the radius the circle should have.

        An IllegalArgumentException may be thrown in the following case:

        • Radius is less than 1.
        Parameters:
        radius - The radius to use for the circle.
        Returns:
        The Circle instance. Useful for chaining.