Class Overview
Defines a simple shape, used for bounding graphical regions.
Can be used with a View, or computed by a Drawable, to drive the shape of shadows cast by a
View, or to clip the contents of the View.
Summary
Public Constructors |
|
Outline()
Constructs an empty Outline.
|
|
Outline(Outline src)
Constructs an Outline with a copy of the data in src.
|
Public Methods |
boolean
|
canClip()
Returns whether the outline can be used to clip a View.
|
boolean
|
isEmpty()
Returns whether the Outline is empty.
|
void
|
set(Outline src)
Replace the contents of this Outline with the contents of src.
|
void
|
setConvexPath(Path convexPath)
|
void
|
setEmpty()
Sets the outline to be empty.
|
void
|
setOval(Rect rect)
|
void
|
setOval(int left, int top, int right, int bottom)
Sets the outline to the oval defined by input rect.
|
void
|
setRect(Rect rect)
|
void
|
setRect(int left, int top, int right, int bottom)
Sets the Outline to the rounded rect defined by the input rect, and corner radius.
|
void
|
setRoundRect(Rect rect, float radius)
|
void
|
setRoundRect(int left, int top, int right, int bottom, float radius)
Sets the Outline to the rounded rect defined by the input rect, and corner radius.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Public Constructors
public
Outline
()
Constructs an empty Outline. Call one of the setter methods to make
the outline valid for use with a View.
public
Outline
(Outline src)
Constructs an Outline with a copy of the data in src.
Public Methods
public
boolean
canClip
()
Returns whether the outline can be used to clip a View.
Currently, only outlines that can be represented as a rectangle, circle, or round rect
support clipping.
public
boolean
isEmpty
()
Returns whether the Outline is empty.
Outlines are empty when constructed, or if setEmpty()
is called,
until a setter method is called
public
void
set
(Outline src)
Replace the contents of this Outline with the contents of src.
Parameters
src
| Source outline to copy from.
|
public
void
setConvexPath
(Path convexPath)
public
void
setEmpty
()
Sets the outline to be empty.
public
void
setOval
(Rect rect)
public
void
setOval
(int left, int top, int right, int bottom)
Sets the outline to the oval defined by input rect.
public
void
setRect
(Rect rect)
public
void
setRect
(int left, int top, int right, int bottom)
Sets the Outline to the rounded rect defined by the input rect, and corner radius.
public
void
setRoundRect
(Rect rect, float radius)
public
void
setRoundRect
(int left, int top, int right, int bottom, float radius)
Sets the Outline to the rounded rect defined by the input rect, and corner radius.
Passing a zero radius is equivalent to calling setRect(int, int, int, int)