# Feature.Factory

Artifact: [androidx.graphics:graphics-shapes](https://developer.android.com/jetpack/androidx/releases/graphics) [View Source](https://cs.android.com/search?q=file:androidx/graphics/shapes/Features.kt+class:androidx.graphics.shapes.Feature.Factory) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/graphics#1.1.0)

*** ** * ** ***


```
public static class Feature.Factory
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Feature` | `https://developer.android.com/reference/androidx/graphics/shapes/Feature.Factory#buildConcaveCorner(kotlin.collections.List)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Cubic> cubics)` Group a list of `https://developer.android.com/reference/androidx/graphics/shapes/Cubic` objects to a concave corner (inward indentation in a shape). |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Feature` | `https://developer.android.com/reference/androidx/graphics/shapes/Feature.Factory#buildConvexCorner(kotlin.collections.List)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Cubic> cubics)` Group a list of `https://developer.android.com/reference/androidx/graphics/shapes/Cubic` objects to a convex corner (outward indentation in a shape). |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Feature` | `https://developer.android.com/reference/androidx/graphics/shapes/Feature.Factory#buildEdge(androidx.graphics.shapes.Cubic)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Cubic cubic)` Group a `https://developer.android.com/reference/androidx/graphics/shapes/Cubic` object to an edge (neither inward or outward identification in a shape). |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Feature` | `https://developer.android.com/reference/androidx/graphics/shapes/Feature.Factory#buildIgnorableFeature(kotlin.collections.List)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Cubic> cubics)` Group a list of `https://developer.android.com/reference/androidx/graphics/shapes/Cubic` objects to a feature that should be ignored in the default `https://developer.android.com/reference/androidx/graphics/shapes/Morph` mapping. |

## Public methods

### buildConcaveCorner

```
public static final @NonNull Feature buildConcaveCorner(@NonNull List<@NonNull Cubic> cubics)
```

Group a list of `https://developer.android.com/reference/androidx/graphics/shapes/Cubic` objects to a concave corner (inward indentation in a shape).

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Cubic> cubics` | The list of raw cubics describing the corner's shape |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | for lists of empty cubics or non-continuous cubics |

### buildConvexCorner

```
public static final @NonNull Feature buildConvexCorner(@NonNull List<@NonNull Cubic> cubics)
```

Group a list of `https://developer.android.com/reference/androidx/graphics/shapes/Cubic` objects to a convex corner (outward indentation in a shape).

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Cubic> cubics` | The list of raw cubics describing the corner's shape |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | for lists of empty cubics or non-continuous cubics |

### buildEdge

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/graphics#1.1.0)

```
public static final @NonNull Feature buildEdge(@NonNull Cubic cubic)
```

Group a `https://developer.android.com/reference/androidx/graphics/shapes/Cubic` object to an edge (neither inward or outward identification in a shape).

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Cubic cubic` | The raw cubic describing the edge's shape |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | for lists of empty cubics or non-continuous cubics |

### buildIgnorableFeature

```
public static final @NonNull Feature buildIgnorableFeature(@NonNull List<@NonNull Cubic> cubics)
```

Group a list of `https://developer.android.com/reference/androidx/graphics/shapes/Cubic` objects to a feature that should be ignored in the default `https://developer.android.com/reference/androidx/graphics/shapes/Morph` mapping. The feature can have any indentation.

Sometimes, it's helpful to ignore certain features when morphing shapes. This is because only the features you mark as important will be smoothly transitioned between the start and end shapes. Additionally, the default morph algorithm will try to match convex corners to convex corners and concave to concave. Marking features as ignorable will influence this matching. For example, given a 12-pointed star, marking all concave corners as ignorable will create a `https://developer.android.com/reference/androidx/graphics/shapes/Morph` that only considers the outer corners of the star. As a result, depending on the morphed to shape, the animation may have fewer intersections and rotations. Another example for the other way around is a `https://developer.android.com/reference/androidx/graphics/shapes/Morph` between a pointed up triangle to a square. Marking the square's top edge as a convex corner matches it to the triangle's upper corner. Instead of moving triangle's upper corner to one of rectangle's corners, the animation now splits the triangle to match squares' outer corners.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/graphics/shapes/Cubic> cubics` | The list of raw cubics describing the feature's shape |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | for lists of empty cubics or non-continuous cubics |