public class AsciiArtUtility extends Object
Modifier and Type | Method and Description |
---|---|
static char |
toAscii(int aRgbValue)
Converts an RGB value to an ASCII character from a palette if characters
as provided.
|
static char |
toAscii(int aRgbValue,
char[] aPalette)
Converts an RGB value to an ASCII character from a palette if characters
as provided.
|
static String[] |
toAsciiArt(String aText,
Font aFont)
|
static String[] |
toAsciiArt(String aText,
Font aFont,
char[] aPalette)
|
static String[] |
toAsciiArt(String aText,
int aWidth,
String aFontName,
int aFontStyle)
This method creates an array of
String instances containing the
given text as so called ASCII art rendered with the given Font
name and Font SOAPBinding.Style to fit into the given width. |
static String[] |
toAsciiArt(String aText,
int aWidth,
String aFontName,
int aFontStyle,
char[] aPalette)
This method creates an array of
String instances containing the
given text as so called ASCII art rendered with the given Font
name and Font SOAPBinding.Style to fit into the given width. |
static String[] |
toInverseAsciiArt(String aText,
Font aFont)
Same as
toAsciiArt with inverted colors (black = white, dark =
bright, bright = dark, white = black). |
static String[] |
toInverseAsciiArt(String aText,
Font aFont,
char[] aPalette)
Same as
toAsciiArt with inverted colors (black = white, dark =
bright, bright = dark, white = black). |
static String[] |
toInverseAsciiArt(String aText,
int aWidth,
String aFontName,
int aFontStyle)
Same as
toAsciiArt with inverted colors (black = white, dark =
bright, bright = dark, white = black). |
static String[] |
toInverseAsciiArt(String aText,
int aWidth,
String aFontName,
int aFontStyle,
char[] aPalette)
Same as
toAsciiArt with inverted colors (black = white, dark =
bright, bright = dark, white = black). |
public static String[] toAsciiArt(String aText, int aWidth, String aFontName, int aFontStyle, char[] aPalette)
String
instances containing the
given text as so called ASCII art rendered with the given Font
name and Font
SOAPBinding.Style
to fit into the given width.aText
- The text to be rendered as ASCII art.aFontName
- The Font
name to be used when rendering to ASCII
art.aFontStyle
- The Font
style to be used when rendering to
ASCII art.aPalette
- The character palate to use when converting an RGB value
to an ASCII character. The first character represents white, the
last character represents black, the characters in between are
gradients from white to black.String
instances, when printed out in the
order as returned, visualize the provided text in the given
Font
as ASCII art.public static String[] toInverseAsciiArt(String aText, int aWidth, String aFontName, int aFontStyle, char[] aPalette)
toAsciiArt
with inverted colors (black = white, dark =
bright, bright = dark, white = black).aText
- The text to be rendered as ASCII art.aFontName
- The Font
name to be used when rendering to ASCII
art.aFontStyle
- The Font
style to be used when rendering to
ASCII art.aPalette
- The character palate to use when converting an RGB value
to an ASCII character. The first character represents white, the
last character represents black, the characters in between are
gradients from white to black.String
instances, when printed out in the
order as returned, visualize the provided text in the given
Font
as ASCII art.public static String[] toAsciiArt(String aText, int aWidth, String aFontName, int aFontStyle)
String
instances containing the
given text as so called ASCII art rendered with the given Font
name and Font
SOAPBinding.Style
to fit into the given width.aText
- The text to be rendered as ASCII art.aFontName
- The Font
name to be used when rendering to ASCII
art.aFontStyle
- The Font
style to be used when rendering to
ASCII art.String
instances, when printed out in the
order as returned, visualize the provided text in the given
Font
as ASCII art.public static String[] toInverseAsciiArt(String aText, int aWidth, String aFontName, int aFontStyle)
toAsciiArt
with inverted colors (black = white, dark =
bright, bright = dark, white = black).aText
- The text to be rendered as ASCII art.aFontName
- The Font
name to be used when rendering to ASCII
art.aFontStyle
- The Font
style to be used when rendering to
ASCII art.String
instances, when printed out in the
order as returned, visualize the provided text in the given
Font
as ASCII art.public static String[] toInverseAsciiArt(String aText, Font aFont)
toAsciiArt
with inverted colors (black = white, dark =
bright, bright = dark, white = black).public static String[] toAsciiArt(String aText, Font aFont, char[] aPalette)
String
instances containing the
given text rendered with the given Font
as so called ASCII art.aText
- The text to be rendered as ASCII art.aFont
- The Font
to render the ASCII art.aPalette
- The character palate to use when converting an RGB value
to an ASCII character. The first character represents white, the
last character represents black, the characters in between are
gradients from white to black.String
instances, when printed out in the
order as returned, visualize the provided text in the given
Font
as ASCII art.public static String[] toInverseAsciiArt(String aText, Font aFont, char[] aPalette)
toAsciiArt
with inverted colors (black = white, dark =
bright, bright = dark, white = black).aText
- The text to be rendered as ASCII art.aFont
- The Font
to render the ASCII art.aPalette
- The character palate to use when converting an RGB value
to an ASCII character. The first character represents white, the
last character represents black, the characters in between are
gradients from white to black.String
instances, when printed out in the
order as returned, visualize the provided text in the given
Font
as ASCII art.public static char toAscii(int aRgbValue, char[] aPalette)
aRgbValue
- The RGB value to be converted to an ASCII character.aPalette
- The character palate to use when converting an RGB value
to an ASCII character. The first character represents white, the
last character represents black, the characters in between are
gradients from white to black.public static char toAscii(int aRgbValue)
aRgbValue
- The RGB value to be converted to an ASCII character.aPalette
- The character palate to use when converting an RGB value
to an ASCII character. The first character represents white, the
last character represents black, the characters in between are
gradients from white to black.Copyright © 2015. All rights reserved.