Interface AsciiArtBuilder

    • Method Detail

      • getAsciiArtMode

        AsciiArtMode getAsciiArtMode​()
        Retrieves the ASCII_HEADER_ASCII_BODY art mode from the ASCII_HEADER_ASCII_BODY art mode property.
        Returns:
        The ASCII_HEADER_ASCII_BODY art mode stored by the ASCII_HEADER_ASCII_BODY art mode property.
      • setAsciiArtMode

        void setAsciiArtMode​(AsciiArtMode aAsciiArtMode)
        Sets the ASCII_HEADER_ASCII_BODY art mode for the ASCII_HEADER_ASCII_BODY art mode property.
        Parameters:
        aAsciiArtMode - The ASCII_HEADER_ASCII_BODY art mode to be stored by the text strip mode property.
      • withAsciiArtMode

        default AsciiArtBuilder withAsciiArtMode​(AsciiArtMode aAsciiArtMode)
        Sets the ASCII_HEADER_ASCII_BODY art mode for the ASCII_HEADER_ASCII_BODY art mode property.
        Parameters:
        aAsciiArtMode - The ASCII_HEADER_ASCII_BODY art mode to be stored by the text strip mode property.
        Returns:
        The builder for applying multiple build operations.
      • getPixmapRatioMode

        PixmapRatioMode getPixmapRatioMode​()
        Retrieves the Pixmap ratio mode from the Pixmap ratio mode property.
        Returns:
        The Pixmap ratio mode stored by the Pixmap ratio mode property.
      • setPixmapRatioMode

        void setPixmapRatioMode​(PixmapRatioMode aPixmapRatioMode)
        Sets the Pixmap ratio mode for the Pixmap ratio mode property.
        Parameters:
        aPixmapRatioMode - The Pixmap ratio mode to be stored by the text strip mode property.
      • withPixmapRatioMode

        default AsciiArtBuilder withPixmapRatioMode​(PixmapRatioMode aPixmapRatioMode)
        Sets the Pixmap ratio mode for the Pixmap ratio mode property.
        Parameters:
        aPixmapRatioMode - The Pixmap ratio mode to be stored by the text strip mode property.
        Returns:
        The builder for applying multiple build operations.
      • getAsciiColors

        char[] getAsciiColors​()
        Retrieves the ASCII_HEADER_ASCII_BODY colors from the ASCII_HEADER_ASCII_BODY colors property.
        Returns:
        The ASCII_HEADER_ASCII_BODY colors stored by the ASCII_HEADER_ASCII_BODY colors property.
      • setAsciiColors

        void setAsciiColors​(char... aAsciiColors)
        Sets the ASCII_HEADER_ASCII_BODY colors for the ASCII_HEADER_ASCII_BODY colors property.
        Parameters:
        aAsciiColors - The ASCII_HEADER_ASCII_BODY colors to be stored by the ASCII_HEADER_ASCII_BODY colors property.
      • withAsciiColors

        default AsciiArtBuilder withAsciiColors​(char... aAsciiColors)
        Sets the ASCII_HEADER_ASCII_BODY colors for the ASCII_HEADER_ASCII_BODY colors property.
        Parameters:
        aAsciiColors - The ASCII_HEADER_ASCII_BODY colors to be stored by the ASCII_HEADER_ASCII_BODY colors property.
        Returns:
        The builder for applying multiple build operations.
      • setAsciiColors

        default void setAsciiColors​(java.lang.String aAsciiColors)
        Sets the ASCII_HEADER_ASCII_BODY colors for the ASCII_HEADER_ASCII_BODY colors property.
        Parameters:
        aAsciiColors - The ASCII_HEADER_ASCII_BODY colors to be stored by the ASCII_HEADER_ASCII_BODY colors property.
      • withAsciiColors

        default AsciiArtBuilder withAsciiColors​(java.lang.String aAsciiColors)
        Sets the ASCII_HEADER_ASCII_BODY colors for the ASCII_HEADER_ASCII_BODY colors property.
        Parameters:
        aAsciiColors - The ASCII_HEADER_ASCII_BODY colors to be stored by the ASCII_HEADER_ASCII_BODY colors property.
        Returns:
        The builder for applying multiple build operations.
      • getAsciiColorPalette

        org.refcodes.data.AsciiColorPalette getAsciiColorPalette​()
        Retrieves the ASCII_HEADER_ASCII_BODY color palette from the ASCII_HEADER_ASCII_BODY color palette property.
        Returns:
        The ASCII_HEADER_ASCII_BODY color palette stored by the ASCII_HEADER_ASCII_BODY color palette property.
      • setAsciiColorPalette

        void setAsciiColorPalette​(org.refcodes.data.AsciiColorPalette aAsciiColorPalette)
        Sets the ASCII_HEADER_ASCII_BODY color palette for the ASCII_HEADER_ASCII_BODY color palette property.
        Parameters:
        aAsciiColorPalette - The ASCII_HEADER_ASCII_BODY color palette to be stored by the ASCII_HEADER_ASCII_BODY color palette property.
      • withAsciiColorPalette

        default AsciiArtBuilder withAsciiColorPalette​(org.refcodes.data.AsciiColorPalette aAsciiColorPalette)
        Sets the ASCII_HEADER_ASCII_BODY color palette for the ASCII_HEADER_ASCII_BODY color palette property.
        Parameters:
        aAsciiColorPalette - The ASCII_HEADER_ASCII_BODY color palette to be stored by the ASCII_HEADER_ASCII_BODY color palette property.
        Returns:
        The builder for applying multiple build operations.
      • getRgbPixmap

        org.refcodes.graphical.RgbPixmap getRgbPixmap​()
        Retrieves the Pixmap from the Pixmap property.
        Returns:
        The Pixmap stored by the Pixmap property.
      • setRgbPixmap

        void setRgbPixmap​(org.refcodes.graphical.RgbPixmap aPixmap)
        Sets the Pixmap for the Pixmap property.
        Parameters:
        aPixmap - The Pixmap to be stored by the Pixmap property.
      • withRgbPixmap

        default AsciiArtBuilder withRgbPixmap​(org.refcodes.graphical.RgbPixmap aPixmap)
        Sets the Pixmap for the Pixmap property.
        Parameters:
        aPixmap - The Pixmap to be stored by the Pixmap property.
        Returns:
        The builder for applying multiple build operations.
      • setImageFile

        default void setImageFile​(java.io.File aImageFile)
                           throws java.io.FileNotFoundException
        Sets the image file for the Pixmap property.
        Parameters:
        aImageFile - The file from which to retrieve the Pixmap which is to be stored by the Pixmap property.
        Throws:
        java.io.FileNotFoundException - in case the file was not found.
      • withImageFile

        default AsciiArtBuilder withImageFile​(java.io.File aImageFile)
                                       throws java.io.FileNotFoundException
        Sets the image file for the Pixmap property.
        Parameters:
        aImageFile - The image file for the Pixmap to be stored by the Pixmap property.
        Returns:
        The builder for applying multiple build operations.
        Throws:
        java.io.FileNotFoundException - in case the file was not found.
      • toString

        default java.lang.String toString​(java.io.File aImageFile)
                                   throws java.io.FileNotFoundException
        Race condition safe shortcut for using withImageFile(File) followed by TextAccessor.TextProvider.toString(). Implementation requirements: This method must not(!) be implemented by calling withImageFile(File) followed by TextAccessor.TextProvider.toString() (do not change the Pixmap property) as this would not be thread safe!
        Parameters:
        aImageFile - The image file to be converted to AsciiArt.
        Returns:
        The according resulting String
        Throws:
        java.io.FileNotFoundException - in case the file was not found
      • toStrings

        default java.lang.String[] toStrings​(java.io.File aImageFile)
                                      throws java.io.FileNotFoundException
        Race condition safe shortcut for using withImageFile(File) followed by TextAccessor.TextProvider.toStrings(). Implementation requirements: This method must not(!) be implemented by calling withImageFile(File) followed by TextAccessor.TextProvider.toStrings() (do not change the Pixmap property) as this would not be thread safe!
        Parameters:
        aImageFile - The image file to be converted to AsciiArt.
        Returns:
        The according resulting String array
        Throws:
        java.io.FileNotFoundException - in case the file was not found