public abstract class SpecialItem extends AbstractConfig implements FontConfigInterface<AbstractConfig.BindData>, ToolConfigInterface, AspectConfigInterface, ImageFilterInterface, StickerConfigInterface
AbstractConfig.BindData
StickerConfigInterface.STICKER_TYPE
isDirty, ORIGINAL_THUMBNAIL_SIZE
Constructor and Description |
---|
SpecialItem() |
SpecialItem(Parcel in) |
Modifier and Type | Method and Description |
---|---|
abstract DataSourceListAdapter.DataSourceViewHolder |
createViewHolder(View view,
boolean useVerticalLayout)
Create a ViewHolder to Display in List
|
void |
detachPanel(boolean revertChanges) |
void |
draw(Texture texture,
float[] mvpMatrix,
float[] stMatrix,
float aspectRatio)
Draw texture in OpenGl Context
|
java.math.BigDecimal |
getAspect() |
int |
getCropHeight() |
int |
getCropWidth() |
abstract int |
getLayout()
Get the layout res id of the list item view.
|
StateHandler |
getStateHandler() |
ImageSource |
getStickerSource()
Get the drawable sticker image source
|
StickerConfigInterface.STICKER_TYPE |
getType()
Return the type of the sticker
|
Typeface |
getTypeface() |
int |
getVerticalLayout()
Get the vertical layout res id of the list item view.
|
boolean |
hasEqualAspect(AspectConfigInterface o) |
boolean |
hasIntensityConfig()
Check if the Filter has Intensity Control
|
boolean |
hasSpecificSize() |
boolean |
isFreeCrop() |
boolean |
isRevertible() |
boolean |
isSelectable() |
void |
refreshPanel() |
void |
release()
Release the shader program and texture
|
Bitmap |
renderImage(Bitmap bitmap,
float intensity,
boolean isPreviewMode)
Apply the renderscript filter with a specific intensity.
|
void |
revertChanges() |
describeContents, generateBindData, generateBindDataAsync, getName, getThumbnailBitmap, getThumbnailBitmap, getThumbnailResId, getThumbnailSource, getTitle, hasStaticThumbnail, isClickable, isDirty, setDirtyFlag, writeToParcel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTitle
generateBindData, generateBindDataAsync, getName, isDirty, setDirtyFlag
@NonNull public abstract DataSourceListAdapter.DataSourceViewHolder createViewHolder(@NonNull View view, boolean useVerticalLayout)
DataSourceInterface
createViewHolder
in interface DataSourceInterface<AbstractConfig.BindData>
createViewHolder
in class AbstractConfig
view
- view inflated with #getLayoutpublic void detachPanel(boolean revertChanges)
detachPanel
in interface ToolConfigInterface
public void draw(Texture texture, float[] mvpMatrix, float[] stMatrix, float aspectRatio)
ImageFilterInterface
draw
in interface ImageFilterInterface
texture
- the camera preview texturemvpMatrix
- the camera sourceType transformationstMatrix
- the stage destination transformationaspectRatio
- the camera image aspectpublic java.math.BigDecimal getAspect()
getAspect
in interface AspectConfigInterface
public int getCropHeight()
getCropHeight
in interface AspectConfigInterface
public int getCropWidth()
getCropWidth
in interface AspectConfigInterface
public abstract int getLayout()
DataSourceInterface
getLayout
in interface DataSourceInterface<AbstractConfig.BindData>
@Nullable public StateHandler getStateHandler()
getStateHandler
in interface ToolConfigInterface
public ImageSource getStickerSource()
StickerConfigInterface
getStickerSource
in interface StickerConfigInterface
@Nullable public StickerConfigInterface.STICKER_TYPE getType()
StickerConfigInterface
getType
in interface StickerConfigInterface
StickerConfigInterface.STICKER_TYPE
@Nullable public Typeface getTypeface()
getTypeface
in interface FontConfigInterface<AbstractConfig.BindData>
public int getVerticalLayout()
DataSourceInterface
getVerticalLayout
in interface DataSourceInterface<AbstractConfig.BindData>
getVerticalLayout
in class AbstractConfig
public boolean hasEqualAspect(@Nullable AspectConfigInterface o)
hasEqualAspect
in interface AspectConfigInterface
public boolean hasIntensityConfig()
ImageFilterInterface
hasIntensityConfig
in interface ImageFilterInterface
public boolean hasSpecificSize()
hasSpecificSize
in interface AspectConfigInterface
public boolean isFreeCrop()
isFreeCrop
in interface AspectConfigInterface
public boolean isRevertible()
isRevertible
in interface ToolConfigInterface
public boolean isSelectable()
isSelectable
in interface DataSourceInterface<AbstractConfig.BindData>
public void refreshPanel()
refreshPanel
in interface ToolConfigInterface
public void release()
ImageFilterInterface
release
in interface ImageFilterInterface
@Nullable public Bitmap renderImage(Bitmap bitmap, float intensity, boolean isPreviewMode)
ImageFilterInterface
renderImage
in interface ImageFilterInterface
bitmap
- the sourceType image.intensity
- the filter intensityisPreviewMode
- set true to triggerOperatorsIfNeeded a faster previewpublic void revertChanges()
revertChanges
in interface ToolConfigInterface