public class FrameConfig extends AbstractConfig implements FrameConfigInterface
AbstractConfig.BindData
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<FrameConfig> |
CREATOR |
id, isDirty, ORIGINAL_THUMBNAIL_SIZE
Modifier | Constructor and Description |
---|---|
protected |
FrameConfig(android.os.Parcel in) |
|
FrameConfig(java.lang.String id,
int name,
int drawableId,
CustomPatchFrameConfig frameConfig)
Creates a Frame Config with unspecific aspect
|
|
FrameConfig(java.lang.String id,
int name,
int drawableId,
CustomPatchFrameConfig frameConfig,
float fixedRelativeScale)
Creates a Frame Config with unspecific aspect
|
|
FrameConfig(java.lang.String id,
int name,
int drawableId,
int frameId,
AspectConfigInterface aspectConfig,
int groupId)
Creates a Frame Config
|
|
FrameConfig(java.lang.String id,
int name,
int drawableId,
int frameId,
int frameMaskId,
AspectConfigInterface aspectConfig,
int groupId)
Creates a Frame Config
|
Modifier and Type | Method and Description |
---|---|
android.graphics.Rect |
calculateInnerRect(android.graphics.Rect inputFullRect) |
RelativeRectAccurate |
calculateInnerRect(RelativeRectFast inputFullRect) |
float[] |
calculateOuterOffsetAndScale() |
android.graphics.Rect |
calculateOuterRect(android.graphics.Rect inputFullRect) |
RelativeRectAccurate |
calculateOuterRect(RelativeRectFast inputFullRect) |
float |
calculateScale(android.graphics.Rect inputFullRect) |
java.math.BigDecimal |
calculateScale(RelativeRectFast 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) |
java.math.BigDecimal |
getAspect() |
int |
getCropHeight() |
int |
getCropWidth() |
float |
getFixedRelativeScale() |
java.math.BigDecimal |
getFrameAspect() |
CustomPatchFrameConfig |
getFrameConfig() |
android.graphics.Rect |
getFrameLimit() |
ImageSource |
getFrameMaskSource()
This can get a separate mask ImageSource, it can be also null.
|
ImageSource |
getFrameSource()
Get frame image source, it can be null.
|
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(AspectConfigInterface o) |
boolean |
hasFixedRelativeScale() |
int |
hashCode() |
boolean |
hasMask() |
boolean |
hasSpecificSize() |
boolean |
hasStaticThumbnail()
Check if it has a static thumbnail drawable.
|
boolean |
isAspectFittingFrame() |
boolean |
isFreeCrop() |
boolean |
isNonFrame() |
boolean |
isSelectable() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
createViewHolder, generateBindData, generateBindDataAsync, getId, getName, getThumbnailBitmap, getThumbnailBitmap, getThumbnailResId, getThumbnailSource, getTitle, getVerticalLayout, isClickable, isDirty, setDirtyFlag
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
createViewHolder, generateBindData, generateBindDataAsync, getId, getName, getVerticalLayout, isDirty, setDirtyFlag
public static final android.os.Parcelable.Creator<FrameConfig> CREATOR
protected FrameConfig(android.os.Parcel in)
public FrameConfig(@Nullable java.lang.String id, @StringRes int name, @DrawableRes int drawableId, CustomPatchFrameConfig frameConfig)
name
- name of this framedrawableId
- preview icon resourceframeConfig
- the frame image resourcepublic FrameConfig(@Nullable java.lang.String id, @StringRes int name, @DrawableRes int drawableId, CustomPatchFrameConfig frameConfig, float fixedRelativeScale)
name
- name of this framedrawableId
- preview icon resourceframeConfig
- the frame image resourcepublic FrameConfig(@Nullable java.lang.String id, @StringRes int name, @DrawableRes int drawableId, @DrawableRes int frameId, @Nullable 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(@Nullable java.lang.String id, @StringRes int name, @DrawableRes int drawableId, @DrawableRes int frameId, @DrawableRes int frameMaskId, @Nullable 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.public android.graphics.Rect calculateInnerRect(android.graphics.Rect inputFullRect)
calculateInnerRect
in interface FrameConfigInterface
public RelativeRectAccurate calculateInnerRect(RelativeRectFast inputFullRect)
calculateInnerRect
in interface FrameConfigInterface
public float[] calculateOuterOffsetAndScale()
calculateOuterOffsetAndScale
in interface FrameConfigInterface
public android.graphics.Rect calculateOuterRect(android.graphics.Rect inputFullRect)
calculateOuterRect
in interface FrameConfigInterface
public RelativeRectAccurate calculateOuterRect(RelativeRectFast inputFullRect)
calculateOuterRect
in interface FrameConfigInterface
public float calculateScale(android.graphics.Rect inputFullRect)
calculateScale
in interface FrameConfigInterface
public java.math.BigDecimal calculateScale(RelativeRectFast inputFullRect)
public static FrameConfig createNonFrameConfig(@StringRes int name, @DrawableRes @RawRes int drawableId)
name
- custom name of this optiondrawableId
- custom icon of this optionpublic int describeContents()
describeContents
in interface android.os.Parcelable
describeContents
in class AbstractConfig
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.math.BigDecimal getAspect()
getAspect
in interface AspectConfigInterface
public int getCropHeight()
getCropHeight
in interface AspectConfigInterface
public int getCropWidth()
getCropWidth
in interface AspectConfigInterface
public float getFixedRelativeScale()
getFixedRelativeScale
in interface FrameConfigInterface
public java.math.BigDecimal getFrameAspect()
getFrameAspect
in interface FrameConfigInterface
public CustomPatchFrameConfig getFrameConfig()
getFrameConfig
in interface FrameConfigInterface
public android.graphics.Rect getFrameLimit()
@Nullable public ImageSource getFrameMaskSource()
getFrameMaskSource
in interface FrameConfigInterface
@Nullable public ImageSource getFrameSource()
getFrameSource
in interface FrameConfigInterface
public int getGroupId()
getGroupId
in interface FrameConfigInterface
public android.graphics.Rect getImageLimit()
getImageLimit
in interface FrameConfigInterface
public int getLayout()
DataSourceInterface
getLayout
in interface DataSourceInterface<AbstractConfig.BindData>
public android.graphics.Rect getOuterLimit()
public boolean hasEqualAspect(@Nullable AspectConfigInterface o)
hasEqualAspect
in interface AspectConfigInterface
hasEqualAspect
in interface FrameConfigInterface
public boolean hasFixedRelativeScale()
hasFixedRelativeScale
in interface FrameConfigInterface
public int hashCode()
hashCode
in class java.lang.Object
public boolean hasMask()
hasMask
in interface FrameConfigInterface
public boolean hasSpecificSize()
hasSpecificSize
in interface AspectConfigInterface
public boolean hasStaticThumbnail()
AbstractConfig
hasStaticThumbnail
in class AbstractConfig
AbstractConfig.getThumbnailBitmap()
public boolean isAspectFittingFrame()
isAspectFittingFrame
in interface FrameConfigInterface
public boolean isFreeCrop()
isFreeCrop
in interface AspectConfigInterface
public boolean isNonFrame()
isNonFrame
in interface FrameConfigInterface
public boolean isSelectable()
isSelectable
in interface DataSourceInterface<AbstractConfig.BindData>
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class AbstractConfig