Interface LVGLImage.ColorMapper

Enclosing class:
LVGLImage

public static interface LVGLImage.ColorMapper
Maps RGB colors to 1 or 2 bit colors.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final android.graphics.Color
    The darkest color supported on the glasses, results in a transparent pixel.
    static final android.graphics.Color
    Displays a dimly lit pixel on the glasses.
    static final android.graphics.Color
    Displays a mid-level lit pixel on the glasses.
    static final android.graphics.Color
    The brightest color supported on the glasses, results in a fully lit pixel.
  • Method Summary

    Modifier and Type
    Method
    Description
    android.graphics.Color[]
    Provides the color palette this mapper uses.
    int
    mapColor(android.graphics.Color color)
    Maps a Color to an index in the palette.
  • Field Details

    • BLACK

      static final android.graphics.Color BLACK
      The darkest color supported on the glasses, results in a transparent pixel.
    • DIM

      static final android.graphics.Color DIM
      Displays a dimly lit pixel on the glasses.
    • MID

      static final android.graphics.Color MID
      Displays a mid-level lit pixel on the glasses.
    • WHITE

      static final android.graphics.Color WHITE
      The brightest color supported on the glasses, results in a fully lit pixel.
  • Method Details

    • getColors

      android.graphics.Color[] getColors()
      Provides the color palette this mapper uses. You must return the appropriate number of colors based on the color format you want to use.
      Returns:
      an array of Colors
    • mapColor

      int mapColor(android.graphics.Color color)
      Maps a Color to an index in the palette. You must return an index that is in the range of palette indices.
      Parameters:
      color - a Color
      Returns:
      the indexed value of the desired Color in the palette.