Methods Summary |
---|
public boolean | equals(java.lang.Object object)
if (this == object) {
return true;
}
if (object == null || getClass() != object.getClass()) {
return false;
}
final PorterDuffColorFilter other = (PorterDuffColorFilter) object;
if (mColor != other.mColor || mMode != other.mMode) {
return false;
}
return true;
|
public int | getColor()Returns the ARGB color used to tint the source pixels when this filter
is applied.
return mColor;
|
public PorterDuff.Mode | getMode()Returns the Porter-Duff mode used to composite this color filter's
color with the source pixel when this filter is applied.
return mMode;
|
public int | hashCode()
return 31 * mMode.hashCode() + mColor;
|
private static native long | native_CreatePorterDuffFilter(int srcColor, int porterDuffMode)
|
public void | setColor(int color)Specifies the color to tint the source pixels with when this color
filter is applied.
mColor = color;
update();
|
public void | setMode(PorterDuff.Mode mode)Specifies the Porter-Duff mode to use when compositing this color
filter's color with the source pixel at draw time.
mMode = mode;
update();
|
private void | update()
destroyFilter(native_instance);
native_instance = native_CreatePorterDuffFilter(mColor, mMode.nativeInt);
|