Class CustomImage.Builder

    • Method Detail

      • createBase

        public static CustomImage.Builder createBase​(@NotNull
                                                     @NotNull Image base)
        Creates a new instance of this Builder using the provided Image instance.
        The provided Image instance will set a few things such as the final image's width and height.
        Parameters:
        base - The Image instance to use as the base layer of the image.
        Returns:
        New instance of this Builder class to use.
      • addImage

        public CustomImage.Builder addImage​(@NotNull
                                            @NotNull Image image)
        Adds an additional Image instance to the image.
        This image will be added as a new layer in the final image by the API.

        Calling this method again or addText(Text) can result in parts of the provided image being covered by the new Image or Text provided in those extra calls. This depends on if parts of the image and text overlap with each other.

        Parameters:
        image - The Image instance to add as a new layer for the image.
        Returns:
        The builder instance after the Image has been added. Useful for chaining.
      • addText

        public CustomImage.Builder addText​(@NotNull
                                           @NotNull Text text)
        Adds a Text instance to the image.
        This text will be added as a new layer in the final image by the API.

        Calling this method again or addImage(Image) can result in parts of the provided image being covered by the new Image or Text provided in those extra calls. This depends on if parts of the image and text overlap with each other.

        Parameters:
        text - The Text instance to add as a new layer for the image.
        Returns:
        The builder instance after the Image has been added. Useful for chaining.