public class FrameConfig extends AbstractConfig implements AbstractConfig.FrameConfigInterface
AbstractConfig.AspectConfigInterface, AbstractConfig.BindData, AbstractConfig.ColorConfigInterface, AbstractConfig.ConfigViewHolder, AbstractConfig.FontConfigInterface<T>, AbstractConfig.FrameConfigInterface, AbstractConfig.ImageFilterInterface, AbstractConfig.StickerConfigInterface, AbstractConfig.ToolConfigInterface| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<FrameConfig> |
CREATOR |
isDirty, NO_STATIC_THUMBNAIL_ID, ORIGINAL_THUMBNAIL_SIZE, thumbnailUri| Modifier | Constructor and Description |
|---|---|
|
FrameConfig(int name,
int drawableId,
int frameId,
AbstractConfig.AspectConfigInterface aspectConfig,
int groupId)
Creates a Frame Config
|
|
FrameConfig(int name,
int drawableId,
int frameId,
int frameMaskId,
AbstractConfig.AspectConfigInterface aspectConfig,
int groupId)
Creates a Frame Config
|
protected |
FrameConfig(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
android.graphics.Rect |
calculateInnerRect(android.graphics.Rect inputFullRect) |
RelativeRect |
calculateInnerRect(RelativeRect inputFullRect) |
float[] |
calculateOuterOffsetAndScale() |
android.graphics.Rect |
calculateOuterRect(android.graphics.Rect inputFullRect) |
RelativeRect |
calculateOuterRect(RelativeRect inputFullRect) |
float |
calculateScale(android.graphics.Rect inputFullRect) |
java.math.BigDecimal |
calculateScale(RelativeRect inputFullRect) |
static FrameConfig |
createNonFrameConfig(int name,
int drawableId)
Creates the non-frame option to remove the frame
|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
float |
getAspect() |
int |
getCropHeight() |
int |
getCropWidth() |
float |
getFrameAspect() |
int |
getFrameId()
Get frame drawable resource id, it can be a drawable or raw resource.
|
android.graphics.Rect |
getFrameLimit() |
int |
getFrameMaskId()
This can get a separate mask drawable resource id, it can be a drawable or raw resource.
|
int |
getGroupId() |
android.graphics.Rect |
getImageLimit()
Gets the Region of the Image.
|
int |
getLayout()
Get the layout res id of the list item view.
|
android.graphics.Rect |
getOuterLimit() |
boolean |
hasEqualAspect(AbstractConfig.AspectConfigInterface o) |
int |
hashCode() |
boolean |
hasMask() |
boolean |
hasSpecificSize() |
boolean |
isFreeCrop() |
boolean |
isNonFrame() |
boolean |
isSelectable() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
createViewHolder, generateBindData, generateBindDataAsync, getName, getThumbnailBitmap, getThumbnailBitmap, getThumbnailResId, getTitle, getVerticalLayout, hasStaticThumbnail, isClickable, isDirty, setDirtyFlagclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcreateViewHolder, generateBindData, generateBindDataAsync, getName, getVerticalLayout, isDirty, setDirtyFlagpublic static final android.os.Parcelable.Creator<FrameConfig> CREATOR
public FrameConfig(@StringRes
int name,
@DrawableRes @RawRes
int drawableId,
@DrawableRes @RawRes
int frameId,
@Nullable
AbstractConfig.AspectConfigInterface aspectConfig,
int groupId)
name - name of this framedrawableId - preview icon resourceframeId - the frame image resourceaspectConfig - the aspect that enable this frame.groupId - the group number to identifier a equal frame with different aspect.
If the crop aspect changed the unfitting frame are replaced with a frame that fit the aspect and has the same group id.public FrameConfig(@StringRes
int name,
@DrawableRes @RawRes
int drawableId,
@DrawableRes @RawRes
int frameId,
@DrawableRes @RawRes
int frameMaskId,
@Nullable
AbstractConfig.AspectConfigInterface aspectConfig,
int groupId)
name - name of this framedrawableId - preview icon resourceframeId - the frame image resourceframeMaskId - the mask of this frame as a blank and white image, full black are 100% transparent full white are opaque. this is Usefull for use JPEG's frames.
aspectConfig - the aspect that enable this frame.groupId - the group number to identifier a equal frame with different aspect.
If the crop aspect changed the unfitting frame are replaced with a frame that fit the aspect and has the same group id.protected FrameConfig(android.os.Parcel in)
public static FrameConfig createNonFrameConfig(@StringRes int name, @DrawableRes @RawRes int drawableId)
name - custom name of this optiondrawableId - custom icon of this option@DrawableRes @RawRes public int getFrameId()
getFrameId in interface AbstractConfig.FrameConfigInterface@DrawableRes @RawRes public int getFrameMaskId()
getFrameMaskId in interface AbstractConfig.FrameConfigInterfacepublic boolean hasMask()
hasMask in interface AbstractConfig.FrameConfigInterfacepublic boolean isNonFrame()
isNonFrame in interface AbstractConfig.FrameConfigInterfacepublic android.graphics.Rect getImageLimit()
getImageLimit in interface AbstractConfig.FrameConfigInterfacepublic android.graphics.Rect calculateOuterRect(android.graphics.Rect inputFullRect)
calculateOuterRect in interface AbstractConfig.FrameConfigInterfacepublic RelativeRect calculateOuterRect(RelativeRect inputFullRect)
calculateOuterRect in interface AbstractConfig.FrameConfigInterfacepublic android.graphics.Rect calculateInnerRect(android.graphics.Rect inputFullRect)
calculateInnerRect in interface AbstractConfig.FrameConfigInterfacepublic RelativeRect calculateInnerRect(RelativeRect inputFullRect)
calculateInnerRect in interface AbstractConfig.FrameConfigInterfacepublic float getFrameAspect()
getFrameAspect in interface AbstractConfig.FrameConfigInterfacepublic android.graphics.Rect getFrameLimit()
public float calculateScale(android.graphics.Rect inputFullRect)
calculateScale in interface AbstractConfig.FrameConfigInterfacepublic java.math.BigDecimal calculateScale(RelativeRect inputFullRect)
public float[] calculateOuterOffsetAndScale()
calculateOuterOffsetAndScale in interface AbstractConfig.FrameConfigInterfacepublic boolean hasEqualAspect(@Nullable
AbstractConfig.AspectConfigInterface o)
hasEqualAspect in interface AbstractConfig.AspectConfigInterfacehasEqualAspect in interface AbstractConfig.FrameConfigInterfacepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getLayout()
DataSourceInterfacegetLayout in interface DataSourceInterface<AbstractConfig.BindData>public boolean isSelectable()
isSelectable in interface DataSourceInterface<AbstractConfig.BindData>public android.graphics.Rect getOuterLimit()
public boolean isFreeCrop()
isFreeCrop in interface AbstractConfig.AspectConfigInterfacepublic float getAspect()
getAspect in interface AbstractConfig.AspectConfigInterfacepublic int getGroupId()
getGroupId in interface AbstractConfig.FrameConfigInterfacepublic boolean hasSpecificSize()
hasSpecificSize in interface AbstractConfig.AspectConfigInterfacepublic int getCropWidth()
getCropWidth in interface AbstractConfig.AspectConfigInterfacepublic int getCropHeight()
getCropHeight in interface AbstractConfig.AspectConfigInterfacepublic int describeContents()
describeContents in interface android.os.ParcelabledescribeContents in class AbstractConfigpublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.ParcelablewriteToParcel in class AbstractConfig