public class DuotoneFilterAsset extends FilterAsset implements FilterAsset.FilterConfigIntensity
FilterAsset.FilterConfigIntensity
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<DuotoneFilterAsset> |
CREATOR |
NONE_FILER, NONE_FILTER_ID
Modifier | Constructor and Description |
---|---|
protected |
DuotoneFilterAsset(android.os.Parcel in) |
protected |
DuotoneFilterAsset(java.lang.String id,
int lightColor,
int darkColor) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
java.lang.Class<? extends AbstractAsset> |
getConfigType() |
int |
getDarkColor() |
float |
getDefaultIntensityValue() |
int |
getLightColor() |
float |
getNeutralStartPoint() |
void |
renderImage(Allocation allocationIn,
Allocation allocationOut,
float intensity,
boolean previewMode) |
android.graphics.Bitmap |
renderImage(android.graphics.Bitmap bitmap,
float intensity,
boolean previewMode)
Render the filter
|
void |
setDarkColor(int darkColor) |
void |
setLightColor(int lightColor) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
hasIntensityConfig, onDraw, preloadLut, release, renderImage, unloadLut
afterAddToAssetMap, getId, hashCode
public static final android.os.Parcelable.Creator<DuotoneFilterAsset> CREATOR
protected DuotoneFilterAsset(@NonNull java.lang.String id, int lightColor, int darkColor)
protected DuotoneFilterAsset(android.os.Parcel in)
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class FilterAsset
public float getDefaultIntensityValue()
getDefaultIntensityValue
in class FilterAsset
public float getNeutralStartPoint()
getNeutralStartPoint
in class FilterAsset
public int getLightColor()
public int getDarkColor()
public void setLightColor(int lightColor)
public void setDarkColor(int darkColor)
public boolean equals(java.lang.Object o)
equals
in class AbstractAsset
@Nullable public android.graphics.Bitmap renderImage(@Nullable android.graphics.Bitmap bitmap, float intensity, boolean previewMode)
renderImage
in interface FilterAsset.FilterConfigIntensity
renderImage
in class FilterAsset
bitmap
- sourceTypeintensity
- filter intensitypreviewMode
- true if the renderer can reduce the quality to improve speed.public void renderImage(Allocation allocationIn, Allocation allocationOut, float intensity, boolean previewMode)
public int describeContents()
describeContents
in interface android.os.Parcelable
describeContents
in class FilterAsset
@NonNull public java.lang.Class<? extends AbstractAsset> getConfigType()
getConfigType
in class FilterAsset