# `GSLayer setShapes:hints:`

*Instance Method*

Replaces the shapes and hints together.

## Declaration

```swift
func setShapes(_ shapes: [GSShape], hints: [GSHint])
```

```objc
- (void) setShapes:(NSArray<GSShape *> *) shapes hints:(NSArray<GSHint *> *) hints;
```

```python
setShapes_hints_(shapes: list[GSShape], hints: list[GSHint])
```

## Discussion

Use this when the replacement content already has matching hint data.

## See Also

### Shapes

- [`GSLayer.shapes`](/Core/GlyphsCore/GSLayer/shapes) — An array of the shape objects defining the visual part of the layer.
- [`GSLayer setShapesFast:`](/Core/GlyphsCore/GSLayer/setShapesFast:) — Replaces the shapes without undo registration or KVO notifications.
- [`GSLayer getCopyOfContentFromLayer:doSelection:`](/Core/GlyphsCore/GSLayer/getCopyOfContentFromLayer:doSelection:) — Copies shapes, hints, anchors, and optionally selected nodes from another layer.
- [`GSLayer countOfShapes`](/Core/GlyphsCore/GSLayer/countOfShapes) — The number of shapes in the layer.
- [`GSLayer indexOfObjectInShapes:`](/Core/GlyphsCore/GSLayer/indexOfObjectInShapes:) — Returns the linear shape index of a shape.
- [`GSLayer objectInShapesAtIndex:`](/Core/GlyphsCore/GSLayer/objectInShapesAtIndex:) — Returns the shape at the given linear shape index.
- [`GSLayer objectInShapesAtIndexFast:`](/Core/GlyphsCore/GSLayer/objectInShapesAtIndexFast:) — Returns the shape at the given linear shape index without locking.
- [`GSLayer clear`](/Core/GlyphsCore/GSLayer/clear) — Removes shapes, anchors, hints, and selection from the layer.

