public interface AsciiArtBuilder extends Text<AsciiArtBuilder>, FontAccessor.FontProperty, FontAccessor.FontBuilder<AsciiArtBuilder>, FontTypeAccessor.FontTypeProperty, FontTypeAccessor.FontTypeBuilder<AsciiArtBuilder>, FontStyleAccessor.FontStyleProperty, FontStyleAccessor.FontStyleBuilder<AsciiArtBuilder>, FontSizeAccessor.FontSizeProperty, FontSizeAccessor.FontSizeBuilder<AsciiArtBuilder>, FontNameAccessor.FontNameProperty, FontNameAccessor.FontNameBuilder<AsciiArtBuilder>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<AsciiArtBuilder>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
AsciiArtBuilder
is represented by an array of
String
instances "visualizing" a given text (rendered with the given
Font
) or image as so called ASCII art. ASCII characters are used as
"pixels" when "paining" the text or image into the String
array.
Different ASCII characters represent different levels of brightness for a
"pixel".TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty, TextAccessor.TextProvider
FontAccessor.FontBuilder<B extends FontAccessor.FontBuilder<B>>, FontAccessor.FontMutator, FontAccessor.FontProperty
FontTypeAccessor.FontTypeBuilder<B extends FontTypeAccessor.FontTypeBuilder<B>>, FontTypeAccessor.FontTypeMutator, FontTypeAccessor.FontTypeProperty
FontStyleAccessor.FontStyleBuilder<B extends FontStyleAccessor.FontStyleBuilder<B>>, FontStyleAccessor.FontStyleMutator, FontStyleAccessor.FontStyleProperty
FontSizeAccessor.FontSizeBuilder<B extends FontSizeAccessor.FontSizeBuilder<B>>, FontSizeAccessor.FontSizeMutator, FontSizeAccessor.FontSizeProperty
FontNameAccessor.FontNameBuilder<B extends FontNameAccessor.FontNameBuilder<B>>, FontNameAccessor.FontNameMutator, FontNameAccessor.FontNameProperty
org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B extends org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B>>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
Modifier and Type | Method and Description |
---|---|
AsciiArtMode |
getAsciiArtMode()
Retrieves the ASCII art mode from the ASCII art mode property.
|
org.refcodes.data.AsciiColorPalette |
getAsciiColorPalette()
Retrieves the ASCII color palette from the ASCII color palette property.
|
char[] |
getAsciiColors()
Retrieves the ASCII colors from the ASCII colors property.
|
PixmapRatioMode |
getPixmapRatioMode()
Retrieves the
Pixmap ratio mode from the Pixmap ratio
mode property. |
org.refcodes.graphical.RgbPixmap |
getRgbPixmap()
Retrieves the
Pixmap from the Pixmap property. |
void |
setAsciiArtMode(AsciiArtMode aAsciiArtMode)
Sets the ASCII art mode for the ASCII art mode property.
|
void |
setAsciiColorPalette(org.refcodes.data.AsciiColorPalette aAsciiColorPalette)
Sets the ASCII color palette for the ASCII color palette property.
|
void |
setAsciiColors(char... aAsciiColors)
Sets the ASCII colors for the ASCII colors property.
|
default void |
setAsciiColors(String aAsciiColors)
Sets the ASCII colors for the ASCII colors property.
|
default void |
setImageFile(File aImageFile)
Sets the image file for the
Pixmap property. |
void |
setPixmapRatioMode(PixmapRatioMode aPixmapRatioMode)
Sets the
Pixmap ratio mode for the Pixmap ratio mode
property. |
void |
setRgbPixmap(org.refcodes.graphical.RgbPixmap aPixmap)
Sets the
Pixmap for the Pixmap property. |
default String |
toString(File aImageFile)
Race condition safe shortcut for using
withImageFile(File)
followed by TextAccessor.TextProvider.toString() . |
String |
toString(org.refcodes.graphical.RgbPixmap aPixmap)
Race condition safe shortcut for using
withRgbPixmap(RgbPixmap)
followed by TextAccessor.TextProvider.toString() . |
default String[] |
toStrings(File aImageFile)
Race condition safe shortcut for using
withImageFile(File)
followed by TextAccessor.TextProvider.toStrings() . |
String[] |
toStrings(org.refcodes.graphical.RgbPixmap aPixmap)
Race condition safe shortcut for using
withRgbPixmap(RgbPixmap)
followed by TextAccessor.TextProvider.toStrings() . |
default AsciiArtBuilder |
withAsciiArtMode(AsciiArtMode aAsciiArtMode)
Sets the ASCII art mode for the ASCII art mode property.
|
default AsciiArtBuilder |
withAsciiColorPalette(org.refcodes.data.AsciiColorPalette aAsciiColorPalette)
Sets the ASCII color palette for the ASCII color palette property.
|
default AsciiArtBuilder |
withAsciiColors(char... aAsciiColors)
Sets the ASCII colors for the ASCII colors property.
|
default AsciiArtBuilder |
withAsciiColors(String aAsciiColors)
Sets the ASCII colors for the ASCII colors property.
|
default AsciiArtBuilder |
withImageFile(File aImageFile)
Sets the image file for the
Pixmap property. |
default AsciiArtBuilder |
withPixmapRatioMode(PixmapRatioMode aPixmapRatioMode)
Sets the
Pixmap ratio mode for the Pixmap ratio mode
property. |
default AsciiArtBuilder |
withRgbPixmap(org.refcodes.graphical.RgbPixmap aPixmap)
Sets the
Pixmap for the Pixmap property. |
getText
setText, setText
withText
toString, toStrings
getFont
setFont
withFont
getFontType
setFontType
withFontType
getFontStyle
setFontStyle
withFontStyle
getFontSize
setFontSize
withFontSize
getFontName
setFontName
withFontName
AsciiArtMode getAsciiArtMode()
void setAsciiArtMode(AsciiArtMode aAsciiArtMode)
aAsciiArtMode
- The ASCII art mode to be stored by the text strip
mode property.default AsciiArtBuilder withAsciiArtMode(AsciiArtMode aAsciiArtMode)
aAsciiArtMode
- The ASCII art mode to be stored by the text strip
mode property.PixmapRatioMode getPixmapRatioMode()
Pixmap
ratio mode from the Pixmap
ratio
mode property.Pixmap
ratio mode stored by the Pixmap
ratio
mode property.void setPixmapRatioMode(PixmapRatioMode aPixmapRatioMode)
Pixmap
ratio mode for the Pixmap
ratio mode
property.aPixmapRatioMode
- The Pixmap
ratio mode to be stored by the
text strip mode property.default AsciiArtBuilder withPixmapRatioMode(PixmapRatioMode aPixmapRatioMode)
Pixmap
ratio mode for the Pixmap
ratio mode
property.aPixmapRatioMode
- The Pixmap
ratio mode to be stored by the
text strip mode property.char[] getAsciiColors()
void setAsciiColors(char... aAsciiColors)
aAsciiColors
- The ASCII colors to be stored by the ASCII colors
property.default AsciiArtBuilder withAsciiColors(char... aAsciiColors)
aAsciiColors
- The ASCII colors to be stored by the ASCII colors
property.default void setAsciiColors(String aAsciiColors)
aAsciiColors
- The ASCII colors to be stored by the ASCII colors
property.default AsciiArtBuilder withAsciiColors(String aAsciiColors)
aAsciiColors
- The ASCII colors to be stored by the ASCII colors
property.org.refcodes.data.AsciiColorPalette getAsciiColorPalette()
void setAsciiColorPalette(org.refcodes.data.AsciiColorPalette aAsciiColorPalette)
aAsciiColorPalette
- The ASCII color palette to be stored by the
ASCII color palette property.default AsciiArtBuilder withAsciiColorPalette(org.refcodes.data.AsciiColorPalette aAsciiColorPalette)
aAsciiColorPalette
- The ASCII color palette to be stored by the
ASCII color palette property.org.refcodes.graphical.RgbPixmap getRgbPixmap()
Pixmap
from the Pixmap
property.Pixmap
stored by the Pixmap
property.void setRgbPixmap(org.refcodes.graphical.RgbPixmap aPixmap)
Pixmap
for the Pixmap
property.aPixmap
- The Pixmap
to be stored by the Pixmap
property.default AsciiArtBuilder withRgbPixmap(org.refcodes.graphical.RgbPixmap aPixmap)
Pixmap
for the Pixmap
property.aPixmap
- The Pixmap
to be stored by the Pixmap
property.default void setImageFile(File aImageFile) throws FileNotFoundException
Pixmap
property.aImageFile
- The file from which to retrieve the Pixmap
which is to be stored by the Pixmap
property.FileNotFoundException
- in case the file was not found.default AsciiArtBuilder withImageFile(File aImageFile) throws FileNotFoundException
Pixmap
property.aImageFile
- The image file for the Pixmap
to be stored by
the Pixmap
property.FileNotFoundException
- in case the file was not found.String toString(org.refcodes.graphical.RgbPixmap aPixmap)
withRgbPixmap(RgbPixmap)
followed by TextAccessor.TextProvider.toString()
.
Implementation requirements: This method must not(!) be implemented by
calling withRgbPixmap(RgbPixmap)
followed by TextAccessor.TextProvider.toString()
(do not change the Pixmap
property) as this would not be thread
safe!aPixmap
- The Pixmap
to be converted to AsciiArt.String
String[] toStrings(org.refcodes.graphical.RgbPixmap aPixmap)
withRgbPixmap(RgbPixmap)
followed by TextAccessor.TextProvider.toStrings()
.
Implementation requirements: This method must not(!) be implemented by
calling withRgbPixmap(RgbPixmap)
followed by
TextAccessor.TextProvider.toStrings()
(do not change the Pixmap
property) as this
would not be thread safe!aPixmap
- The Pixmap
to be converted to AsciiArt.String
arraydefault String toString(File aImageFile) throws FileNotFoundException
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!aImageFile
- The image file to be converted to AsciiArt.String
FileNotFoundException
- in case the file was not founddefault String[] toStrings(File aImageFile) throws FileNotFoundException
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!aImageFile
- The image file to be converted to AsciiArt.String
arrayFileNotFoundException
- in case the file was not foundCopyright © 2017. All rights reserved.