Class Image.Triangle

  • Enclosing class:
    Image

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

    Supported options:

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

      • Triangle

        public Triangle()
    • Method Detail

      • withPosX

        public Image.Triangle 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 Triangle instance. Useful for chaining.
      • withPosY

        public Image.Triangle 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 Triangle instance. Useful for chaining.
      • withWidth

        public Image.Triangle withWidth​(int width)
        Sets the width of the Image.

        An IllegalArgumentException may be thrown in the following case:

        • Width is less than 1 or larger than 3000.
        Specified by:
        withWidth in class Image
        Parameters:
        width - The width of the image.
        Returns:
        The Triangle instance. Useful for chaining.
      • withHeight

        public Image.Triangle withHeight​(int height)
        Sets the height of the Image.

        An IllegalArgumentException may be thrown in the following case:

        • Height is less than 1 or larger than 3000.
        Specified by:
        withHeight in class Image
        Parameters:
        height - The height of the image.
        Returns:
        The Triangle instance. Useful for chaining.
      • withColor

        public Image.Triangle 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 Triangle instance. Useful for chaining.
      • withCut

        public Image.Triangle withCut​(@NotNull
                                      @NotNull Image.Cut cut)
        Sets where the missing piece of the triangle should be displayed.
        Parameters:
        cut - The cut position to use.
        Returns:
        The Triangle instance. Useful for chaining.