Code example for PixelFormat

Methods: getPixelFormatInfo

0
      return getMetrics().widthPixels;
  } 
 
  @CalledByNative 
  public int getBitsPerPixel() { 
      PixelFormat info = new PixelFormat();
      PixelFormat.getPixelFormatInfo(getDisplay().getPixelFormat(), info);
      return info.bitsPerPixel;
  } 
 
  @CalledByNative 
  public int getBitsPerComponent() { 
      int format = getDisplay().getPixelFormat();
      switch (format) {
      case PixelFormat.RGBA_4444:
          return 4; 
 
      case PixelFormat.RGBA_5551:
          return 5; 
 
      case PixelFormat.RGBA_8888: