public class RectShape extends Shape
ShapeDrawable
.Constructor and Description |
---|
RectShape()
RectShape constructor.
|
Modifier and Type | Method and Description |
---|---|
RectShape |
clone()
Creates and returns a copy of this
Object . |
void |
draw(Canvas canvas,
Paint paint)
Draw this shape into the provided Canvas, with the provided Paint.
|
protected void |
onResize(float width,
float height)
Callback method called when
Shape.resize(float,float) is executed. |
protected RectF |
rect()
Returns the RectF that defines this rectangle's bounds.
|
public void draw(Canvas canvas, Paint paint)
Shape
Shape.resize(float,float)
.protected void onResize(float width, float height)
Shape
Shape.resize(float,float)
is executed.protected final RectF rect()
public RectShape clone() throws CloneNotSupportedException
Object
Object
. The default
implementation returns a so-called "shallow" copy: It creates a new
instance of the same class and then copies the field values (including
object references) from this instance to the new instance. A "deep" copy,
in contrast, would also recursively clone nested objects. A subclass that
needs to implement this kind of cloning should call super.clone()
to create the new instance and then create deep copies of the nested,
mutable objects.clone
in class Shape
CloneNotSupportedException
- if this object's class does not implement the Cloneable
interface.