Package jexer.bits

Class ColorEmojiGlyphMaker


  • public class ColorEmojiGlyphMaker
    extends java.lang.Object
    ColorEmojiGlyphMaker provides access to the color emoji image files located in "emojis/" on the classpath.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean canDisplay​(int ch)
      Checks if an emoji glyph for the specified codepoint is available.
      static boolean canDisplay​(int[] codePoints)
      Checks if an emoji glyph for the specified codepoint(s) is available.
      static boolean canDisplay​(Cell cell)
      Checks if an emoji glyph for the specified codepoint(s) is available.
      static java.awt.image.BufferedImage getImage​(ComplexCell complexCell, int cellWidth, int cellHeight, Backend backend, boolean blinkVisible)
      Get an emoji image for a complex cell.
      static java.awt.image.BufferedImage getImage​(ComplexCell complexCell, int cellWidth, int cellHeight, Backend backend, boolean blinkVisible, Cell.Width widthEnum)
      Get an emoji image for a complex cell.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • canDisplay

        public static boolean canDisplay​(int ch)
        Checks if an emoji glyph for the specified codepoint is available.
        Parameters:
        ch - the emoji (single Unicode codepoint) for which a glyph is needed.
        Returns:
        true if a glyph for the character is available; false otherwise.
      • canDisplay

        public static boolean canDisplay​(int[] codePoints)
        Checks if an emoji glyph for the specified codepoint(s) is available.
        Parameters:
        codePoints - the emoji (sequence of Unicode codepoints) for which a glyph is needed.
        Returns:
        true if a glyph for the character is available; false otherwise.
      • canDisplay

        public static boolean canDisplay​(Cell cell)
        Checks if an emoji glyph for the specified codepoint(s) is available.
        Parameters:
        cell - the cell containing an emoji (sequence of Unicode codepoints) for which a glyph is needed.
        Returns:
        true if a glyph for the character is available; false otherwise.
      • getImage

        public static java.awt.image.BufferedImage getImage​(ComplexCell complexCell,
                                                            int cellWidth,
                                                            int cellHeight,
                                                            Backend backend,
                                                            boolean blinkVisible)
        Get an emoji image for a complex cell.
        Parameters:
        complexCell - the emoji to draw
        cellWidth - the width of the text cell to draw into
        cellHeight - the height of the text cell to draw into
        backend - the backend that can obtain the correct background color
        blinkVisible - if true, the cell is visible if it is blinking
        Returns:
        the glyph as an image
      • getImage

        public static java.awt.image.BufferedImage getImage​(ComplexCell complexCell,
                                                            int cellWidth,
                                                            int cellHeight,
                                                            Backend backend,
                                                            boolean blinkVisible,
                                                            Cell.Width widthEnum)
        Get an emoji image for a complex cell.
        Parameters:
        complexCell - the emoji to draw
        cellWidth - the width of the text cell to draw into
        cellHeight - the height of the text cell to draw into
        backend - the backend that can obtain the correct background color
        blinkVisible - if true, the cell is visible if it is blinking
        widthEnum - If SINGLE, return the entire image. If LEFT or RIGHT, return only half of the image (either left side or right side).
        Returns:
        the glyph as an image