public class FrameAsset extends AbstractAsset
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<FrameAsset> |
CREATOR |
static FrameAsset |
NONE_FRAME |
static java.lang.String |
NONE_FRAME_ID |
Modifier | Constructor and Description |
---|---|
protected |
FrameAsset(android.os.Parcel in) |
|
FrameAsset(java.lang.String id,
CustomPatchFrameAsset frameConfig)
Creates a Frame Config with unspecific aspect
|
|
FrameAsset(java.lang.String id,
CustomPatchFrameAsset frameConfig,
float fixedRelativeScale)
Creates a Frame Config with unspecific aspect
|
|
FrameAsset(java.lang.String id,
CustomPatchFrameAsset frameConfig,
float fixedRelativeScale,
boolean scaleIsFixed)
Creates a Frame Config with unspecific aspect
|
|
FrameAsset(java.lang.String id,
int frameId,
CropAspectAsset aspectConfig,
int groupId)
Creates a Frame Config
|
|
FrameAsset(java.lang.String id,
int frameId,
int frameMaskId,
CropAspectAsset 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) |
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
java.math.BigDecimal |
getAspect() |
java.lang.Class<? extends AbstractAsset> |
getConfigType() |
int |
getCropHeight() |
int |
getCropWidth() |
float |
getFixedRelativeScale() |
java.math.BigDecimal |
getFrameAspect() |
CustomPatchFrameAsset |
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.
|
android.graphics.Rect |
getOuterLimit() |
boolean |
hasEqualAspect(CropAspectAsset o) |
boolean |
hasFixedRelativeScale() |
int |
hashCode() |
boolean |
hasMask() |
boolean |
hasSpecificSize() |
boolean |
isAspectFittingFrame() |
boolean |
isFreeCrop() |
boolean |
isNonFrame() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
afterAddToAssetMap, getId
public static final java.lang.String NONE_FRAME_ID
public static final FrameAsset NONE_FRAME
public static final android.os.Parcelable.Creator<FrameAsset> CREATOR
public FrameAsset(@NonNull java.lang.String id, @DrawableRes int frameId, @Nullable CropAspectAsset aspectConfig, int groupId)
frameId
- 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 FrameAsset(@NonNull java.lang.String id, CustomPatchFrameAsset frameConfig)
frameConfig
- the frame image resourcepublic FrameAsset(@NonNull java.lang.String id, CustomPatchFrameAsset frameConfig, float fixedRelativeScale)
frameConfig
- the frame image resourcepublic FrameAsset(@NonNull java.lang.String id, CustomPatchFrameAsset frameConfig, float fixedRelativeScale, boolean scaleIsFixed)
frameConfig
- the frame image resourcepublic FrameAsset(@NonNull java.lang.String id, @DrawableRes int frameId, @DrawableRes int frameMaskId, @Nullable CropAspectAsset aspectConfig, int groupId)
frameId
- 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 FrameAsset(android.os.Parcel in)
public final java.lang.Class<? extends AbstractAsset> getConfigType()
getConfigType
in class AbstractAsset
@Nullable public ImageSource getFrameSource()
@Nullable public ImageSource getFrameMaskSource()
public boolean hasMask()
public boolean isNonFrame()
public android.graphics.Rect getImageLimit()
public CustomPatchFrameAsset getFrameConfig()
public android.graphics.Rect calculateOuterRect(android.graphics.Rect inputFullRect)
public RelativeRectAccurate calculateOuterRect(RelativeRectFast inputFullRect)
public android.graphics.Rect calculateInnerRect(android.graphics.Rect inputFullRect)
public float getFixedRelativeScale()
public boolean hasFixedRelativeScale()
public boolean isAspectFittingFrame()
public RelativeRectAccurate calculateInnerRect(RelativeRectFast inputFullRect)
public java.math.BigDecimal getFrameAspect()
public android.graphics.Rect getFrameLimit()
public float calculateScale(android.graphics.Rect inputFullRect)
public java.math.BigDecimal calculateScale(RelativeRectFast inputFullRect)
public float[] calculateOuterOffsetAndScale()
public boolean hasEqualAspect(@Nullable CropAspectAsset o)
public boolean equals(java.lang.Object o)
equals
in class AbstractAsset
public int hashCode()
hashCode
in class AbstractAsset
public android.graphics.Rect getOuterLimit()
public boolean isFreeCrop()
public java.math.BigDecimal getAspect()
public int getGroupId()
public boolean hasSpecificSize()
public int getCropWidth()
public int getCropHeight()
public int describeContents()
describeContents
in interface android.os.Parcelable
describeContents
in class AbstractAsset
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class AbstractAsset