public class ColorMatrixOperation extends AbstractOperation
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ly.img.android.sdk.operator.AbstractEditorOperation.EditorProtectedAccessor
Helper class to access protected Editor methods.
|
AbstractOperation.Holder, AbstractOperation.MODE, AbstractOperation.OperationDoneListener, AbstractOperation.ResultHolder, AbstractOperation.SourceHolder| Constructor and Description |
|---|
ColorMatrixOperation() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doOperation() |
float |
getBrightness()
Get the current brightness
|
protected android.graphics.ColorMatrix |
getBrightnessMatrix(float brightness) |
float |
getContrast()
Get the current contrast
|
protected android.graphics.ColorMatrix |
getContrastMatrix(float contrast) |
protected java.lang.String |
getIdentifier() |
AbstractOperation.MODE |
getOperationMode()
Return the current execution mode of this operator.
|
protected Operator.Priority |
getPriority() |
float |
getSaturation()
Get the current Saturation.
|
protected android.graphics.ColorMatrix |
getSaturationMatrix(float saturation) |
StickerHolderView |
getStickerStage()
Get the Sticker stage to add, edit or remove Sticker
|
void |
init(EditorPreview editorPreview) |
protected void |
runOnUiThread(ly.img.android.sdk.operator.AbstractEditorOperation.UiRunnable runnable)
Run a part of the operation async on the next Main Thread frame.
|
void |
setBrightness(float brightness)
Set image brightness
|
void |
setContrast(float contrast)
Set the contrast.
|
void |
setSaturation(float saturation)
Set image saturation.
|
compareTo, doOperation, equals, getOperationRunnable, getOperator, getResultBitmapHolder, hasBitmapHolder, hashCode, operationDone, toStringprotected Operator.Priority getPriority()
getPriority in class AbstractOperationprotected java.lang.String getIdentifier()
getIdentifier in class AbstractOperationpublic AbstractOperation.MODE getOperationMode()
AbstractOperationgetOperationMode in class AbstractOperationAbstractOperation.MODEprotected boolean doOperation()
doOperation in class AbstractOperationprotected android.graphics.ColorMatrix getSaturationMatrix(float saturation)
protected android.graphics.ColorMatrix getContrastMatrix(float contrast)
protected android.graphics.ColorMatrix getBrightnessMatrix(float brightness)
public void setSaturation(float saturation)
saturation - A value of 0 maps the color to gray-scale. 1 is identity. 1 > intense the color.public float getSaturation()
public float getBrightness()
public void setBrightness(float brightness)
brightness - A value of 0 maps the color to black. 1 is identity. 2 is white.public float getContrast()
public void setContrast(float contrast)
contrast - A value of 0 the image is totally gray. 1 is identity. 1 > intense the contrast.public void init(EditorPreview editorPreview)
protected void runOnUiThread(ly.img.android.sdk.operator.AbstractEditorOperation.UiRunnable runnable)
runnable - UiRunnable implementationpublic StickerHolderView getStickerStage()