# StretchLayoutSolver class

Namespace: [Grasshopper2.UI](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class StretchLayoutSolver
```

Utility class for solving stretching layouts.

## Properties

- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.stretchlayoutsolver/count.md): Gets the number of elements defined in this solver.

## Indexers

- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.stretchlayoutsolver/item.md): Gets the size of the element at the given index.

## Methods

- [Add](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.stretchlayoutsolver/add.md): Add an element to this layout. Negative dimensions will be clipped to zero.
- [Round](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.stretchlayoutsolver/round.md): After solving, you may wish to round the layout to pull all the elements to integer coordinates.
- [Solve](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.stretchlayoutsolver/solve.md): Solve the elements given a fixed target size.
