Package io.anyline2.viewplugin
Class CutoutConfig
- java.lang.Object
-
- io.anyline2.viewplugin.CutoutConfig
-
public class CutoutConfig extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CutoutConfig.AnimationStyle
static class
CutoutConfig.CutoutAlignment
-
Field Summary
Fields Modifier and Type Field Description CutoutConfig.CutoutAlignment
alignment
double
alphaFactor
CutoutConfig.AnimationStyle
animation
static java.lang.String
ATT_ALIGNMENT
static java.lang.String
ATT_ANIMATION
static java.lang.String
ATT_ANIMATION_FADE
static java.lang.String
ATT_ANIMATION_NONE
static java.lang.String
ATT_ANIMATION_ZOOM
static java.lang.String
ATT_BOTTOM
static java.lang.String
ATT_BOTTOM_HALF
static java.lang.String
ATT_CENTER
static java.lang.String
ATT_CORNER_RADIUS
static java.lang.String
ATT_CROP_OFFSET
static java.lang.String
ATT_CROP_PADDING
static java.lang.String
ATT_FEEDBACK_STROKE_COLOR
static java.lang.String
ATT_HEIGHT
static java.lang.String
ATT_IMAGE
static java.lang.String
ATT_MAX_HEIGHT_PERCENT
static java.lang.String
ATT_MAX_WIDTH_PERCENT
static java.lang.String
ATT_OFFSET
static java.lang.String
ATT_OUTER_ALPHA
static java.lang.String
ATT_OUTER_COLOR
static java.lang.String
ATT_RATIO_FROM_SIZE
static java.lang.String
ATT_STROKE_COLOR
static java.lang.String
ATT_STROKE_WIDTH
static java.lang.String
ATT_TOP
static java.lang.String
ATT_TOP_HALF
static java.lang.String
ATT_WIDTH
static java.lang.String
ATT_X
static java.lang.String
ATT_Y
int
cornerRadius
android.graphics.Point
cropOffset
android.graphics.Point
cropPadding
java.lang.String
feedbackStrokeColor
java.lang.String
image
int
maxHeightPercent
int
maxWidthPercent
android.graphics.Point
offset
java.lang.String
outerColor
android.util.Size
ratioFromSize
java.lang.String
strokeColor
int
strokeWidth
int
width
-
Constructor Summary
Constructors Constructor Description CutoutConfig()
CutoutConfig(org.json.JSONObject jsonObject)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAnimationStyle()
static CutoutConfig.AnimationStyle
getAnimationStyle(java.lang.String style)
int
getCornerRadiusInPix(android.content.Context context)
java.lang.String
getCutoutAlignment()
static CutoutConfig.CutoutAlignment
getCutoutAlignment(java.lang.String alignment)
int
getCutoutStrokeWidthInPix(android.content.Context context)
int
getFeedbackStrokeColor()
int
getOuterColor()
java.lang.String
getOuterColorWithAlpha()
float
getRatio()
boolean
isRatioFromSizeDefined()
static CutoutConfig
provideFullFrameCutoutConfig()
-
-
-
Field Detail
-
ATT_ANIMATION
public static final java.lang.String ATT_ANIMATION
- See Also:
- Constant Field Values
-
ATT_IMAGE
public static final java.lang.String ATT_IMAGE
- See Also:
- Constant Field Values
-
ATT_WIDTH
public static final java.lang.String ATT_WIDTH
- See Also:
- Constant Field Values
-
ATT_HEIGHT
public static final java.lang.String ATT_HEIGHT
- See Also:
- Constant Field Values
-
ATT_ALIGNMENT
public static final java.lang.String ATT_ALIGNMENT
- See Also:
- Constant Field Values
-
ATT_RATIO_FROM_SIZE
public static final java.lang.String ATT_RATIO_FROM_SIZE
- See Also:
- Constant Field Values
-
ATT_STROKE_WIDTH
public static final java.lang.String ATT_STROKE_WIDTH
- See Also:
- Constant Field Values
-
ATT_STROKE_COLOR
public static final java.lang.String ATT_STROKE_COLOR
- See Also:
- Constant Field Values
-
ATT_CORNER_RADIUS
public static final java.lang.String ATT_CORNER_RADIUS
- See Also:
- Constant Field Values
-
ATT_OUTER_COLOR
public static final java.lang.String ATT_OUTER_COLOR
- See Also:
- Constant Field Values
-
ATT_OUTER_ALPHA
public static final java.lang.String ATT_OUTER_ALPHA
- See Also:
- Constant Field Values
-
ATT_FEEDBACK_STROKE_COLOR
public static final java.lang.String ATT_FEEDBACK_STROKE_COLOR
- See Also:
- Constant Field Values
-
ATT_MAX_WIDTH_PERCENT
public static final java.lang.String ATT_MAX_WIDTH_PERCENT
- See Also:
- Constant Field Values
-
ATT_MAX_HEIGHT_PERCENT
public static final java.lang.String ATT_MAX_HEIGHT_PERCENT
- See Also:
- Constant Field Values
-
ATT_OFFSET
public static final java.lang.String ATT_OFFSET
- See Also:
- Constant Field Values
-
ATT_X
public static final java.lang.String ATT_X
- See Also:
- Constant Field Values
-
ATT_Y
public static final java.lang.String ATT_Y
- See Also:
- Constant Field Values
-
ATT_CROP_PADDING
public static final java.lang.String ATT_CROP_PADDING
- See Also:
- Constant Field Values
-
ATT_CROP_OFFSET
public static final java.lang.String ATT_CROP_OFFSET
- See Also:
- Constant Field Values
-
ATT_TOP
public static final java.lang.String ATT_TOP
- See Also:
- Constant Field Values
-
ATT_TOP_HALF
public static final java.lang.String ATT_TOP_HALF
- See Also:
- Constant Field Values
-
ATT_CENTER
public static final java.lang.String ATT_CENTER
- See Also:
- Constant Field Values
-
ATT_BOTTOM_HALF
public static final java.lang.String ATT_BOTTOM_HALF
- See Also:
- Constant Field Values
-
ATT_BOTTOM
public static final java.lang.String ATT_BOTTOM
- See Also:
- Constant Field Values
-
ATT_ANIMATION_NONE
public static final java.lang.String ATT_ANIMATION_NONE
- See Also:
- Constant Field Values
-
ATT_ANIMATION_FADE
public static final java.lang.String ATT_ANIMATION_FADE
- See Also:
- Constant Field Values
-
ATT_ANIMATION_ZOOM
public static final java.lang.String ATT_ANIMATION_ZOOM
- See Also:
- Constant Field Values
-
animation
public CutoutConfig.AnimationStyle animation
-
alignment
public CutoutConfig.CutoutAlignment alignment
-
width
public int width
-
ratioFromSize
public android.util.Size ratioFromSize
-
strokeWidth
public int strokeWidth
-
strokeColor
public java.lang.String strokeColor
-
cornerRadius
public int cornerRadius
-
outerColor
public java.lang.String outerColor
-
alphaFactor
public double alphaFactor
-
feedbackStrokeColor
public java.lang.String feedbackStrokeColor
-
image
public java.lang.String image
-
maxWidthPercent
public int maxWidthPercent
-
maxHeightPercent
public int maxHeightPercent
-
offset
public android.graphics.Point offset
-
cropPadding
public android.graphics.Point cropPadding
-
cropOffset
public android.graphics.Point cropOffset
-
-
Method Detail
-
getCutoutAlignment
public java.lang.String getCutoutAlignment()
-
getCutoutAlignment
public static CutoutConfig.CutoutAlignment getCutoutAlignment(java.lang.String alignment) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
getAnimationStyle
public java.lang.String getAnimationStyle()
-
getAnimationStyle
public static CutoutConfig.AnimationStyle getAnimationStyle(java.lang.String style) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
provideFullFrameCutoutConfig
public static CutoutConfig provideFullFrameCutoutConfig()
-
isRatioFromSizeDefined
public boolean isRatioFromSizeDefined()
-
getRatio
public float getRatio()
-
getFeedbackStrokeColor
public int getFeedbackStrokeColor()
-
getOuterColor
public int getOuterColor()
-
getOuterColorWithAlpha
public java.lang.String getOuterColorWithAlpha()
-
getCornerRadiusInPix
public int getCornerRadiusInPix(android.content.Context context)
-
getCutoutStrokeWidthInPix
public int getCutoutStrokeWidthInPix(android.content.Context context)
-
-