java.lang.Object | |
↳ | android.graphics.Outline |
Defines a simple shape, used for bounding graphical regions.
Can be computed for 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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an empty Outline.
| |||||||||||
Constructs an Outline with a copy of the data in src.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns whether the outline can be used to clip a View.
| |||||||||||
Returns the alpha represented by the Outline.
| |||||||||||
Returns whether the Outline is empty.
| |||||||||||
Replace the contents of this Outline with the contents of src.
| |||||||||||
Sets the alpha represented by the Outline - the degree to which the
producer is guaranteed to be opaque over the Outline's shape.
| |||||||||||
Sets the Constructs an Outline from a
convex path .
| |||||||||||
Sets the outline to be empty.
| |||||||||||
Convenience for
setOval(int, int, int, int)
| |||||||||||
Sets the outline to the oval defined by input rect.
| |||||||||||
Convenience for
setRect(int, int, int, int)
| |||||||||||
Sets the Outline to the rounded rect defined by the input rect, and
corner radius.
| |||||||||||
Convenience for
setRoundRect(int, int, int, int, float)
| |||||||||||
Sets the Outline to the rounded rect defined by the input rect, and corner radius.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructs an empty Outline. Call one of the setter methods to make the outline valid for use with a View.
Constructs an Outline with a copy of the data in src.
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.
Returns whether the Outline is empty.
Outlines are empty when constructed, or if setEmpty()
is called,
until a setter method is called
Replace the contents of this Outline with the contents of src.
src | Source outline to copy from. |
---|
Sets the alpha represented by the Outline - the degree to which the producer is guaranteed to be opaque over the Outline's shape.
An alpha value of 0.0f
either represents completely
transparent content, or content that isn't guaranteed to fill the shape
it publishes.
Content producing a fully opaque (alpha = 1.0f
) outline is
assumed by the drawing system to fully cover content beneath it,
meaning content beneath may be optimized away.
Sets the Constructs an Outline from a
convex path
.
Sets the outline to the oval defined by input rect.
Sets the Outline to the rounded rect defined by the input rect, and corner radius.
Convenience for setRoundRect(int, int, int, int, float)
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)