| Constructor and Description |
|---|
CornerRadiusTransform(float cornerRadius) |
| Modifier and Type | Method and Description |
|---|---|
RectF |
getBounds()
Returns current transform bounds - latest received by
onBoundsChange(Rect). |
float |
getCornerRadius() |
void |
onBoundsChange(Rect bounds)
Called by
GifDrawable when its bounds changes by GifDrawable.onBoundsChange(Rect)
and when transform is associated using GifDrawable.setTransform(Transform). |
void |
onDraw(Canvas canvas,
Paint paint,
Bitmap buffer)
Called by
GifDrawable when its GifDrawable.draw(Canvas) is called. |
void |
setCornerRadius(float cornerRadius)
Sets the corner radius to be applied when drawing the bitmap.
|
public CornerRadiusTransform(float cornerRadius)
cornerRadius - corner radius, may be 0.public void setCornerRadius(float cornerRadius)
cornerRadius - corner radius or 0 to remove roundingpublic float getCornerRadius()
@NonNull public RectF getBounds()
onBoundsChange(Rect).public void onBoundsChange(Rect bounds)
TransformGifDrawable when its bounds changes by GifDrawable.onBoundsChange(Rect)
and when transform is associated using GifDrawable.setTransform(Transform).
In this latter case the latest GifDrawable bounds (empty Rect if they were not set yet).onBoundsChange in interface Transformbounds - new boundspublic void onDraw(Canvas canvas, Paint paint, Bitmap buffer)
TransformGifDrawable when its GifDrawable.draw(Canvas) is called.