{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

Outline

public sealed class Outline

Known direct subclasses
Outline.Generic

An area defined as a path.

Outline.Rectangle

Rectangular area.

Outline.Rounded

Rectangular area with rounded corners.


Defines a simple shape, used for bounding graphical regions.

Can be used for defining a shape of the component background, a shape of shadows cast by the component, or to clip the contents.

Summary

Nested types

public final class Outline.Generic extends Outline

An area defined as a path.

public final class Outline.Rectangle extends Outline

Rectangular area.

public final class Outline.Rounded extends Outline

Rectangular area with rounded corners.

Protected constructors

Public methods

abstract @NonNull Rect

Return the bounds of the outline

Protected constructors

Outline

protected Outline()

Public methods

getBounds

public abstract @NonNull Rect getBounds()

Return the bounds of the outline