Package org.refcodes.textual
Interface AsciiArtBuilder
-
- All Superinterfaces:
org.refcodes.mixin.ColumnWidthAccessor
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<AsciiArtBuilder>
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
,FontAccessor
,FontAccessor.FontBuilder<AsciiArtBuilder>
,FontAccessor.FontMutator
,FontAccessor.FontProperty
,FontNameAccessor
,FontNameAccessor.FontNameBuilder<AsciiArtBuilder>
,FontNameAccessor.FontNameMutator
,FontNameAccessor.FontNameProperty
,FontSizeAccessor
,FontSizeAccessor.FontSizeBuilder<AsciiArtBuilder>
,FontSizeAccessor.FontSizeMutator
,FontSizeAccessor.FontSizeProperty
,FontStyleAccessor
,FontStyleAccessor.FontStyleBuilder<AsciiArtBuilder>
,FontStyleAccessor.FontStyleMutator
,FontStyleAccessor.FontStyleProperty
,FontTypeAccessor
,FontTypeAccessor.FontTypeBuilder<AsciiArtBuilder>
,FontTypeAccessor.FontTypeMutator
,FontTypeAccessor.FontTypeProperty
,Text<AsciiArtBuilder>
,TextAccessor
,TextAccessor.TextBuilder<Text<AsciiArtBuilder>>
,TextAccessor.TextMutator
,TextAccessor.TextProperty
,TextAccessor.TextProvider
- All Known Implementing Classes:
AsciiArtBuilderImpl
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
ASCII art as of theAsciiArtBuilder
is represented by an array ofString
instances "visualizing" a given text (rendered with the givenFont
) or image as so called ASCII art. ASCII characters are used as "pixels" when "paining" the text or image into theString
array. Different ASCII characters represent different levels of brightness for a "pixel".
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ColumnWidthAccessor
org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B extends org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B>>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
-
Nested classes/interfaces inherited from interface org.refcodes.textual.FontAccessor
FontAccessor.FontBuilder<B extends FontAccessor.FontBuilder<B>>, FontAccessor.FontMutator, FontAccessor.FontProperty
-
Nested classes/interfaces inherited from interface org.refcodes.textual.FontNameAccessor
FontNameAccessor.FontNameBuilder<B extends FontNameAccessor.FontNameBuilder<B>>, FontNameAccessor.FontNameMutator, FontNameAccessor.FontNameProperty
-
Nested classes/interfaces inherited from interface org.refcodes.textual.FontSizeAccessor
FontSizeAccessor.FontSizeBuilder<B extends FontSizeAccessor.FontSizeBuilder<B>>, FontSizeAccessor.FontSizeMutator, FontSizeAccessor.FontSizeProperty
-
Nested classes/interfaces inherited from interface org.refcodes.textual.FontStyleAccessor
FontStyleAccessor.FontStyleBuilder<B extends FontStyleAccessor.FontStyleBuilder<B>>, FontStyleAccessor.FontStyleMutator, FontStyleAccessor.FontStyleProperty
-
Nested classes/interfaces inherited from interface org.refcodes.textual.FontTypeAccessor
FontTypeAccessor.FontTypeBuilder<B extends FontTypeAccessor.FontTypeBuilder<B>>, FontTypeAccessor.FontTypeMutator, FontTypeAccessor.FontTypeProperty
-
Nested classes/interfaces inherited from interface org.refcodes.textual.TextAccessor
TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty, TextAccessor.TextProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method 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 thePixmap
ratio mode from thePixmap
ratio mode property.org.refcodes.graphical.RgbPixmap
getRgbPixmap()
Retrieves thePixmap
from thePixmap
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(java.lang.String aAsciiColors)
Sets the ASCII colors for the ASCII colors property.default void
setImageFile(java.io.File aImageFile)
Sets the image file for thePixmap
property.void
setPixmapRatioMode(PixmapRatioMode aPixmapRatioMode)
Sets thePixmap
ratio mode for thePixmap
ratio mode property.void
setRgbPixmap(org.refcodes.graphical.RgbPixmap aPixmap)
Sets thePixmap
for thePixmap
property.default java.lang.String
toString(java.io.File aImageFile)
Race condition safe shortcut for usingwithImageFile(File)
followed byTextAccessor.TextProvider.toString()
.java.lang.String
toString(org.refcodes.graphical.RgbPixmap aPixmap)
Race condition safe shortcut for usingwithRgbPixmap(RgbPixmap)
followed byTextAccessor.TextProvider.toString()
.default java.lang.String[]
toStrings(java.io.File aImageFile)
Race condition safe shortcut for usingwithImageFile(File)
followed byTextAccessor.TextProvider.toStrings()
.java.lang.String[]
toStrings(org.refcodes.graphical.RgbPixmap aPixmap)
Race condition safe shortcut for usingwithRgbPixmap(RgbPixmap)
followed byTextAccessor.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(java.lang.String aAsciiColors)
Sets the ASCII colors for the ASCII colors property.default AsciiArtBuilder
withImageFile(java.io.File aImageFile)
Sets the image file for thePixmap
property.default AsciiArtBuilder
withPixmapRatioMode(PixmapRatioMode aPixmapRatioMode)
Sets thePixmap
ratio mode for thePixmap
ratio mode property.default AsciiArtBuilder
withRgbPixmap(org.refcodes.graphical.RgbPixmap aPixmap)
Sets thePixmap
for thePixmap
property.-
Methods inherited from interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder
withColumnWidth
-
Methods inherited from interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
setColumnWidth
-
Methods inherited from interface org.refcodes.textual.FontAccessor
getFont
-
Methods inherited from interface org.refcodes.textual.FontAccessor.FontBuilder
withFont
-
Methods inherited from interface org.refcodes.textual.FontAccessor.FontMutator
setFont
-
Methods inherited from interface org.refcodes.textual.FontNameAccessor
getFontName
-
Methods inherited from interface org.refcodes.textual.FontNameAccessor.FontNameBuilder
withFontName
-
Methods inherited from interface org.refcodes.textual.FontNameAccessor.FontNameMutator
setFontName
-
Methods inherited from interface org.refcodes.textual.FontSizeAccessor
getFontSize
-
Methods inherited from interface org.refcodes.textual.FontSizeAccessor.FontSizeBuilder
withFontSize
-
Methods inherited from interface org.refcodes.textual.FontSizeAccessor.FontSizeMutator
setFontSize
-
Methods inherited from interface org.refcodes.textual.FontStyleAccessor
getFontStyle
-
Methods inherited from interface org.refcodes.textual.FontStyleAccessor.FontStyleBuilder
withFontStyle
-
Methods inherited from interface org.refcodes.textual.FontStyleAccessor.FontStyleMutator
setFontStyle
-
Methods inherited from interface org.refcodes.textual.FontTypeAccessor
getFontType
-
Methods inherited from interface org.refcodes.textual.FontTypeAccessor.FontTypeBuilder
withFontType
-
Methods inherited from interface org.refcodes.textual.FontTypeAccessor.FontTypeMutator
setFontType
-
Methods inherited from interface org.refcodes.textual.TextAccessor
getText
-
Methods inherited from interface org.refcodes.textual.TextAccessor.TextBuilder
withText
-
Methods inherited from interface org.refcodes.textual.TextAccessor.TextMutator
setText, setText
-
Methods inherited from interface org.refcodes.textual.TextAccessor.TextProvider
toString, toStrings
-
-
-
-
Method Detail
-
getAsciiArtMode
AsciiArtMode getAsciiArtMode()
Retrieves the ASCII art mode from the ASCII art mode property.- Returns:
- The ASCII art mode stored by the ASCII art mode property.
-
setAsciiArtMode
void setAsciiArtMode(AsciiArtMode aAsciiArtMode)
Sets the ASCII art mode for the ASCII art mode property.- Parameters:
aAsciiArtMode
- The ASCII art mode to be stored by the text strip mode property.
-
withAsciiArtMode
default AsciiArtBuilder withAsciiArtMode(AsciiArtMode aAsciiArtMode)
Sets the ASCII art mode for the ASCII art mode property.- Parameters:
aAsciiArtMode
- The ASCII art mode to be stored by the text strip mode property.- Returns:
- The builder for applying multiple build operations.
-
getPixmapRatioMode
PixmapRatioMode getPixmapRatioMode()
Retrieves thePixmap
ratio mode from thePixmap
ratio mode property.- Returns:
- The
Pixmap
ratio mode stored by thePixmap
ratio mode property.
-
setPixmapRatioMode
void setPixmapRatioMode(PixmapRatioMode aPixmapRatioMode)
Sets thePixmap
ratio mode for thePixmap
ratio mode property.- Parameters:
aPixmapRatioMode
- ThePixmap
ratio mode to be stored by the text strip mode property.
-
withPixmapRatioMode
default AsciiArtBuilder withPixmapRatioMode(PixmapRatioMode aPixmapRatioMode)
Sets thePixmap
ratio mode for thePixmap
ratio mode property.- Parameters:
aPixmapRatioMode
- ThePixmap
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 colors from the ASCII colors property.- Returns:
- The ASCII colors stored by the ASCII colors property.
-
setAsciiColors
void setAsciiColors(char... aAsciiColors)
Sets the ASCII colors for the ASCII colors property.- Parameters:
aAsciiColors
- The ASCII colors to be stored by the ASCII colors property.
-
withAsciiColors
default AsciiArtBuilder withAsciiColors(char... aAsciiColors)
Sets the ASCII colors for the ASCII colors property.- Parameters:
aAsciiColors
- The ASCII colors to be stored by the ASCII colors property.- Returns:
- The builder for applying multiple build operations.
-
setAsciiColors
default void setAsciiColors(java.lang.String aAsciiColors)
Sets the ASCII colors for the ASCII colors property.- Parameters:
aAsciiColors
- The ASCII colors to be stored by the ASCII colors property.
-
withAsciiColors
default AsciiArtBuilder withAsciiColors(java.lang.String aAsciiColors)
Sets the ASCII colors for the ASCII colors property.- Parameters:
aAsciiColors
- The ASCII colors to be stored by the ASCII colors property.- Returns:
- The builder for applying multiple build operations.
-
getAsciiColorPalette
org.refcodes.data.AsciiColorPalette getAsciiColorPalette()
Retrieves the ASCII color palette from the ASCII color palette property.- Returns:
- The ASCII color palette stored by the ASCII color palette property.
-
setAsciiColorPalette
void setAsciiColorPalette(org.refcodes.data.AsciiColorPalette aAsciiColorPalette)
Sets the ASCII color palette for the ASCII color palette property.- Parameters:
aAsciiColorPalette
- The ASCII color palette to be stored by the ASCII color palette property.
-
withAsciiColorPalette
default AsciiArtBuilder withAsciiColorPalette(org.refcodes.data.AsciiColorPalette aAsciiColorPalette)
Sets the ASCII color palette for the ASCII color palette property.- Parameters:
aAsciiColorPalette
- The ASCII color palette to be stored by the ASCII color palette property.- Returns:
- The builder for applying multiple build operations.
-
getRgbPixmap
org.refcodes.graphical.RgbPixmap getRgbPixmap()
Retrieves thePixmap
from thePixmap
property.- Returns:
- The
Pixmap
stored by thePixmap
property.
-
setRgbPixmap
void setRgbPixmap(org.refcodes.graphical.RgbPixmap aPixmap)
Sets thePixmap
for thePixmap
property.- Parameters:
aPixmap
- ThePixmap
to be stored by thePixmap
property.
-
withRgbPixmap
default AsciiArtBuilder withRgbPixmap(org.refcodes.graphical.RgbPixmap aPixmap)
Sets thePixmap
for thePixmap
property.- Parameters:
aPixmap
- ThePixmap
to be stored by thePixmap
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 thePixmap
property.- Parameters:
aImageFile
- The file from which to retrieve thePixmap
which is to be stored by thePixmap
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 thePixmap
property.- Parameters:
aImageFile
- The image file for thePixmap
to be stored by thePixmap
property.- Returns:
- The builder for applying multiple build operations.
- Throws:
java.io.FileNotFoundException
- in case the file was not found.
-
toString
java.lang.String toString(org.refcodes.graphical.RgbPixmap aPixmap)
Race condition safe shortcut for usingwithRgbPixmap(RgbPixmap)
followed byTextAccessor.TextProvider.toString()
. Implementation requirements: This method must not(!) be implemented by callingwithRgbPixmap(RgbPixmap)
followed byTextAccessor.TextProvider.toString()
(do not change thePixmap
property) as this would not be thread safe!- Parameters:
aPixmap
- ThePixmap
to be converted to AsciiArt.- Returns:
- The according resulting
String
-
toStrings
java.lang.String[] toStrings(org.refcodes.graphical.RgbPixmap aPixmap)
Race condition safe shortcut for usingwithRgbPixmap(RgbPixmap)
followed byTextAccessor.TextProvider.toStrings()
. Implementation requirements: This method must not(!) be implemented by callingwithRgbPixmap(RgbPixmap)
followed byTextAccessor.TextProvider.toStrings()
(do not change thePixmap
property) as this would not be thread safe!- Parameters:
aPixmap
- ThePixmap
to be converted to AsciiArt.- Returns:
- The according resulting
String
array
-
toString
default java.lang.String toString(java.io.File aImageFile) throws java.io.FileNotFoundException
Race condition safe shortcut for usingwithImageFile(File)
followed byTextAccessor.TextProvider.toString()
. Implementation requirements: This method must not(!) be implemented by callingwithImageFile(File)
followed byTextAccessor.TextProvider.toString()
(do not change thePixmap
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 usingwithImageFile(File)
followed byTextAccessor.TextProvider.toStrings()
. Implementation requirements: This method must not(!) be implemented by callingwithImageFile(File)
followed byTextAccessor.TextProvider.toStrings()
(do not change thePixmap
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
-
-