/** * Returns a {@link android.graphics.PixelFormat graphics.PixelFormat} value of OPAQUE or * TRANSLUCENT. */ @Override public int getOpacity() { return mNinePatch.hasAlpha() || (mPaint != null && mPaint.getAlpha() < 255) ? PixelFormat.TRANSLUCENT : PixelFormat.OPAQUE; }