public class FrameConfig extends AbstractConfig implements FrameConfigInterface
AbstractConfig.BindData
Modifier and Type | Field and Description |
---|---|
static <any> |
CREATOR |
isDirty, ORIGINAL_THUMBNAIL_SIZE
Modifier | Constructor and Description |
---|---|
|
FrameConfig(int name,
int drawableId,
CustomPatchFrameConfig frameConfig)
Creates a Frame Config with unspecific aspect
|
|
FrameConfig(int name,
int drawableId,
CustomPatchFrameConfig frameConfig,
float fixedRelativeScale)
Creates a Frame Config with unspecific aspect
|
|
FrameConfig(int name,
int drawableId,
int frameId,
AspectConfigInterface aspectConfig,
int groupId)
Creates a Frame Config
|
|
FrameConfig(int name,
int drawableId,
int frameId,
int frameMaskId,
AspectConfigInterface aspectConfig,
int groupId)
Creates a Frame Config
|
protected |
FrameConfig(Parcel in) |
Modifier and Type | Method and Description |
---|---|
Rect |
calculateInnerRect(Rect inputFullRect) |
float[] |
calculateOuterOffsetAndScale() |
Rect |
calculateOuterRect(Rect inputFullRect) |
float |
calculateScale(Rect 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() |
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() |
Rect |
getImageLimit()
Gets the Region of the Image.
|
int |
getLayout()
Get the layout res id of the list item view.
|
Rect |
getOuterLimit() |
boolean |
hasEqualAspect(AspectConfigInterface o) |
boolean |
hasFixedRelativeScale() |
int |
hashCode() |
boolean |
hasMask() |
boolean |
hasSpecificSize() |
boolean |
isAspectFittingFrame() |
boolean |
isFreeCrop() |
boolean |
isNonFrame() |
boolean |
isSelectable() |
void |
writeToParcel(Parcel dest,
int flags) |
createViewHolder, generateBindData, generateBindDataAsync, getName, getThumbnailBitmap, getThumbnailBitmap, getThumbnailResId, getThumbnailSource, getTitle, getVerticalLayout, hasStaticThumbnail, isClickable, isDirty, setDirtyFlag
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
createViewHolder, generateBindData, generateBindDataAsync, getName, getVerticalLayout, isDirty, setDirtyFlag
public FrameConfig(@StringRes int name, @DrawableRes int drawableId, CustomPatchFrameConfig frameConfig)
name
- name of this framedrawableId
- preview icon resourceframeConfig
- the frame image resourcepublic FrameConfig(@StringRes int name, @DrawableRes int drawableId, CustomPatchFrameConfig frameConfig, float fixedRelativeScale)
name
- name of this framedrawableId
- preview icon resourceframeConfig
- the frame image resourcepublic FrameConfig(@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(@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.protected FrameConfig(Parcel in)
public Rect calculateInnerRect(Rect inputFullRect)
calculateInnerRect
in interface FrameConfigInterface
public float[] calculateOuterOffsetAndScale()
calculateOuterOffsetAndScale
in interface FrameConfigInterface
public Rect calculateOuterRect(Rect inputFullRect)
calculateOuterRect
in interface FrameConfigInterface
public float calculateScale(Rect inputFullRect)
calculateScale
in interface FrameConfigInterface
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 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 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 Rect getImageLimit()
getImageLimit
in interface FrameConfigInterface
public int getLayout()
DataSourceInterface
getLayout
in interface DataSourceInterface<AbstractConfig.BindData>
public 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 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(Parcel dest, int flags)
writeToParcel
in class AbstractConfig