Class LPaint


  • public class LPaint
    extends Paint
    Custom paint that doesn't set text locale. It takes ~1ms on initialization and isn't needed so removing it speeds up setComposition.
    • Constructor Detail

      • LPaint

        public LPaint()
      • LPaint

        public LPaint​(int flags)
    • Method Detail

      • setAlpha

        public void setAlpha​(int alpha)
        Overrides Paint.setAlpha(int) to avoid unnecessary ColorSpace$Named[] allocations when calling this method in Android 29 or lower.
        Overrides:
        setAlpha in class Paint
        Parameters:
        alpha - set the alpha component [0..255] of the paint's color.