public ColorSwapBitmapTextureAtlasSourceDecorator(final IBitmapTextureAtlasSource pBitmapTextureAtlasSource, final IBitmapTextureAtlasSourceDecoratorShape pBitmapTextureAtlasSourceDecoratorShape, final int pColorKeyColorARGBPackedInt, final int pTolerance, final int pColorSwapColorARGBPackedInt, final TextureAtlasSourceDecoratorOptions pTextureAtlasSourceDecoratorOptions) { super(pBitmapTextureAtlasSource, pBitmapTextureAtlasSourceDecoratorShape, pTextureAtlasSourceDecoratorOptions); this.mColorKeyColorARGBPackedInt = pColorKeyColorARGBPackedInt; this.mTolerance = pTolerance; this.mColorSwapColorARGBPackedInt = pColorSwapColorARGBPackedInt; this.mPaint.setXfermode(new AvoidXfermode(pColorKeyColorARGBPackedInt, pTolerance, Mode.TARGET)); this.mPaint.setColor(pColorSwapColorARGBPackedInt); if (SystemUtils.isAndroidVersionOrHigher(Build.VERSION_CODES.JELLY_BEAN)) { Debug.w("The class " + ColorSwapBitmapTextureAtlasSourceDecorator.class.getSimpleName() + " is deprecated for Android API Level: '" + Build.VERSION_CODES.JELLY_BEAN + "' and higher, since the class " + AvoidXfermode.class.getSimpleName() + " is deprecated since then."); } }
public ColorSwapBitmapTextureAtlasSourceDecorator(final IBitmapTextureAtlasSource pBitmapTextureAtlasSource, final IBitmapTextureAtlasSourceDecoratorShape pBitmapTextureAtlasSourceDecoratorShape, final int pColorKeyColorARGBPackedInt, final int pTolerance, final int pColorSwapColorARGBPackedInt, final TextureAtlasSourceDecoratorOptions pTextureAtlasSourceDecoratorOptions) { super(pBitmapTextureAtlasSource, pBitmapTextureAtlasSourceDecoratorShape, pTextureAtlasSourceDecoratorOptions); this.mColorKeyColorARGBPackedInt = pColorKeyColorARGBPackedInt; this.mTolerance = pTolerance; this.mColorSwapColorARGBPackedInt = pColorSwapColorARGBPackedInt; this.mPaint.setXfermode(new AvoidXfermode(pColorKeyColorARGBPackedInt, pTolerance, Mode.TARGET)); this.mPaint.setColor(pColorSwapColorARGBPackedInt); }
public ColorSwapTextureSourceDecorator(final ITextureSource pTextureSource, final ITextureSourceDecoratorShape pTextureSourceDecoratorShape, final int pColorKeyColor, final int pTolerance, final int pColorSwapColor, final TextureSourceDecoratorOptions pTextureSourceDecoratorOptions) { super(pTextureSource, pTextureSourceDecoratorShape, pTextureSourceDecoratorOptions); this.mColorKeyColor = pColorKeyColor; this.mTolerance = pTolerance; this.mColorSwapColor = pColorSwapColor; this.mPaint.setXfermode(new AvoidXfermode(pColorKeyColor, pTolerance, Mode.TARGET)); this.mPaint.setColor(pColorSwapColor); }