java.lang.Object | ||
↳ | android.graphics.drawable.Drawable | |
↳ | com.facebook.drawee.drawable.RoundedDrawable |
Known Direct Subclasses |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected int | mBorderColor | ||||||||||
protected final Path | mBorderPath | ||||||||||
protected float | mBorderWidth | ||||||||||
protected boolean | mIsCircle | ||||||||||
protected boolean | mIsShaderTransformDirty | ||||||||||
protected final Path | mPath | ||||||||||
protected boolean | mRadiiNonZero |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | clearColorFilter() | ||||||||||
void | draw(Canvas canvas) | ||||||||||
int | getAlpha() | ||||||||||
int |
getBorderColor()
Gets the border color.
| ||||||||||
float |
getBorderWidth()
Gets the border width.
| ||||||||||
ColorFilter | getColorFilter() | ||||||||||
int | getIntrinsicHeight() | ||||||||||
int | getIntrinsicWidth() | ||||||||||
int | getOpacity() | ||||||||||
float |
getPadding()
Gets the padding.
| ||||||||||
boolean |
getPaintFilterBitmap()
Gets whether to set FILTER_BITMAP_FLAG flag to Paint.
| ||||||||||
float[] |
getRadii()
Gets the radii.
| ||||||||||
boolean |
getScaleDownInsideBorders()
Gets whether image should be scaled down inside borders.
| ||||||||||
boolean |
isCircle()
Returns whether or not this drawable rounds as circle.
| ||||||||||
void | setAlpha(int alpha) | ||||||||||
void |
setBorder(int color, float width)
Sets the border
| ||||||||||
void |
setCircle(boolean isCircle)
Sets whether to round as circle.
| ||||||||||
void | setColorFilter(ColorFilter colorFilter) | ||||||||||
void | setColorFilter(int color, PorterDuff.Mode mode) | ||||||||||
void |
setPadding(float padding)
Sets the padding for the bitmap.
| ||||||||||
void |
setPaintFilterBitmap(boolean paintFilterBitmap)
Sets FILTER_BITMAP_FLAG flag to Paint.
| ||||||||||
void |
setRadii(float[] radii)
Specify radii for each of the 4 corners.
| ||||||||||
void |
setRadius(float radius)
Specify radius for the corners of the rectangle.
| ||||||||||
void |
setScaleDownInsideBorders(boolean scaleDownInsideBorders)
Sets whether image should be scaled down inside borders.
| ||||||||||
void |
setTransformCallback(TransformCallback transformCallback)
TransformAwareDrawable method
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | onBoundsChange(Rect bounds) | ||||||||||
void | updatePath() | ||||||||||
void | updateTransform() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.graphics.drawable.Drawable
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.facebook.drawee.drawable.Rounded
| |||||||||||
From interface
com.facebook.drawee.drawable.TransformAwareDrawable
|
Gets the border color.
Gets the border width.
Gets the padding.
Gets whether to set FILTER_BITMAP_FLAG flag to Paint.
Gets the radii.
Gets whether image should be scaled down inside borders.
Returns whether or not this drawable rounds as circle.
Sets the border
color | of the border |
---|---|
width | of the border |
Sets whether to round as circle.
isCircle | whether or not to round as circle |
---|
Sets the padding for the bitmap.
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. |
---|
Specify radii for each of the 4 corners. For each corner, the array contains 2 values, [X_radius, Y_radius]. The corners are ordered top-left, top-right, bottom-right, bottom-left
radii | the x and y radii of the corners |
---|
Specify radius for the corners of the rectangle. If this is > 0, then the drawable is drawn in a round-rectangle, rather than a rectangle.
radius | the radius for the corners of the rectangle |
---|
Sets whether image should be scaled down inside borders.
TransformAwareDrawable method
transformCallback | the transform callback to be set |
---|