Package jexer.bits
Class UnicodeGlyphImage
- java.lang.Object
-
- jexer.bits.UnicodeGlyphImage
-
public class UnicodeGlyphImage extends java.lang.ObjectUnicodeGlyphImage constructs a single character from the Unicode block-drawing elements ("Symbols For Legacy Computing") from a bitmap image.
-
-
Constructor Summary
Constructors Constructor Description UnicodeGlyphImage(java.awt.image.BufferedImage image)Public constructor.UnicodeGlyphImage(Cell cell)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CelltoHalfBlockGlyph()Create a single glyph using Unicode half-blocks that best represents this entire image.CelltoQuadrantBlockGlyph()Create a single glyph using Unicode quadrant-blocks that best represents this entire image.CelltoSextantBlockGlyph()Create a single glyph using Unicode 6-dot Braille blocks that best represents this entire image.CelltoSixDotGlyph()Create a single glyph using Unicode 6-dot Braille blocks that best represents this entire image, with one foreground color on a black background.CelltoSixDotSolidGlyph()Create a single glyph using Unicode 6-dot Braille blocks that best represents this entire image.
-
-
-
Constructor Detail
-
UnicodeGlyphImage
public UnicodeGlyphImage(Cell cell) throws java.lang.IllegalArgumentException
Public constructor.- Parameters:
cell- a Cell to read image data from- Throws:
java.lang.IllegalArgumentException- if cell does not have an image
-
UnicodeGlyphImage
public UnicodeGlyphImage(java.awt.image.BufferedImage image)
Public constructor.- Parameters:
image- the bitmap image
-
-
Method Detail
-
toHalfBlockGlyph
public Cell toHalfBlockGlyph()
Create a single glyph using Unicode half-blocks that best represents this entire image.- Returns:
- a cell with character, foreground, and background color set
-
toQuadrantBlockGlyph
public Cell toQuadrantBlockGlyph()
Create a single glyph using Unicode quadrant-blocks that best represents this entire image.- Returns:
- a cell with character, foreground, and background color set
-
toSixDotGlyph
public Cell toSixDotGlyph()
Create a single glyph using Unicode 6-dot Braille blocks that best represents this entire image, with one foreground color on a black background.- Returns:
- a cell with character and foreground color set
-
toSixDotSolidGlyph
public Cell toSixDotSolidGlyph()
Create a single glyph using Unicode 6-dot Braille blocks that best represents this entire image.- Returns:
- a cell with character, foreground, and background color set
-
toSextantBlockGlyph
public Cell toSextantBlockGlyph()
Create a single glyph using Unicode 6-dot Braille blocks that best represents this entire image.- Returns:
- a cell with character, foreground, and background color set
-
-