java.lang.Object | |
↳ | com.facebook.drawee.generic.RoundingParams |
Class that encapsulates rounding parameters.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | RoundingParams.RoundingMethod |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
RoundingParams() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static RoundingParams |
asCircle()
Factory method that creates new RoundingParams with RoundAsCircle specified.
| ||||||||||
boolean | equals(Object o) | ||||||||||
static RoundingParams |
fromCornersRadii(float topLeft, float topRight, float bottomRight, float bottomLeft)
Factory method that creates new RoundingParams with the specified corners radii.
| ||||||||||
static RoundingParams |
fromCornersRadii(float[] radii)
Factory method that creates new RoundingParams with the specified corners radii.
| ||||||||||
static RoundingParams |
fromCornersRadius(float radius)
Factory method that creates new RoundingParams with the specified corners radius.
| ||||||||||
int |
getBorderColor()
Gets the border color
| ||||||||||
float |
getBorderWidth()
Gets the border width
| ||||||||||
float[] |
getCornersRadii()
Gets the rounded corners radii.
| ||||||||||
int |
getOverlayColor()
Gets the overlay color.
| ||||||||||
float |
getPadding()
Gets the padding size
| ||||||||||
boolean |
getPaintFilterBitmap()
Gets whether to set FILTER_BITMAP_FLAG flag to Paint.
| ||||||||||
boolean |
getRoundAsCircle()
Gets whether to round as circle
| ||||||||||
RoundingParams.RoundingMethod |
getRoundingMethod()
Gets the rounding method.
| ||||||||||
boolean |
getScaleDownInsideBorders()
Gets whether image should be scaled down inside borders.
| ||||||||||
int | hashCode() | ||||||||||
RoundingParams |
setBorder(int color, float width)
Sets the border around the rounded drawable
| ||||||||||
RoundingParams |
setBorderColor(int color)
Sets the border color
| ||||||||||
RoundingParams |
setBorderWidth(float width)
Sets the border width
| ||||||||||
RoundingParams |
setCornersRadii(float topLeft, float topRight, float bottomRight, float bottomLeft)
Sets the rounded corners radii.
| ||||||||||
RoundingParams |
setCornersRadii(float[] radii)
Sets the rounded corners radii.
| ||||||||||
RoundingParams |
setCornersRadius(float radius)
Sets the rounded corners radius.
| ||||||||||
RoundingParams |
setOverlayColor(int overlayColor)
Sets the overlay color and changes the method to
RoundingMethod.COLOR_OVERLAY . | ||||||||||
RoundingParams |
setPadding(float padding)
Sets the padding on rounded drawable.
| ||||||||||
RoundingParams |
setPaintFilterBitmap(boolean paintFilterBitmap)
Sets FILTER_BITMAP_FLAG flag to Paint.
| ||||||||||
RoundingParams |
setRoundAsCircle(boolean roundAsCircle)
Sets whether to round as circle.
| ||||||||||
RoundingParams |
setRoundingMethod(RoundingParams.RoundingMethod roundingMethod)
Sets the rounding method.
| ||||||||||
RoundingParams |
setScaleDownInsideBorders(boolean scaleDownInsideBorders)
Sets whether image should be scaled down inside borders.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Factory method that creates new RoundingParams with RoundAsCircle specified.
Factory method that creates new RoundingParams with the specified corners radii.
Factory method that creates new RoundingParams with the specified corners radii.
Factory method that creates new RoundingParams with the specified corners radius.
Gets the border color
Gets the border width
Gets the rounded corners radii.
For performance reasons the internal array is returned directly. Do not modify it directly, but use one of the exposed corner radii setters instead.
Gets the overlay color.
Gets the padding size
Gets whether to set FILTER_BITMAP_FLAG flag to Paint.
Gets whether to round as circle
Gets whether image should be scaled down inside borders.
Sets the border around the rounded drawable
color | of the border |
---|---|
width | of the width |
Sets the border color
color | of the border |
---|
Sets the border width
width | of the width |
---|
Sets the rounded corners radii.
topLeft | top-left corner radius in pixels |
---|---|
topRight | top-right corner radius in pixels |
bottomRight | bottom-right corner radius in pixels |
bottomLeft | bottom-left corner radius in pixels |
Sets the rounded corners radii.
radii | float array of 8 radii in pixels. Each corner receives two radius values [X, Y]. The corners are ordered top-left, top-right, bottom-right, bottom-left. |
---|
Sets the rounded corners radius.
radius | corner radius in pixels |
---|
Sets the overlay color and changes the method to RoundingMethod.COLOR_OVERLAY
.
overlayColor | overlay color |
---|
Sets the padding on rounded drawable. Works only with RoundingMethod.BITMAP_ONLY
padding | the padding in pixels |
---|
Sets FILTER_BITMAP_FLAG flag to Paint. FILTER_BITMAP_FLAG
This should generally be on when drawing bitmaps, unless performance-bound (rendering to software canvas) or preferring pixelation artifacts to blurriness when scaling significantly.
paintFilterBitmap | whether to set FILTER_BITMAP_FLAG flag to Paint. |
---|
Sets whether to round as circle.
roundAsCircle | whether or not to round as circle |
---|
Sets the rounding method.
roundingMethod | method of rounding |
---|
Sets whether image should be scaled down inside borders.
scaleDownInsideBorders | whether image should be scaled down inside borders or borders will be drawn over image |
---|