# `GSLayer roundSelectedCoordinates:`

*Instance Method*

Rounds selected element coordinates to a grid.

## Declaration

```swift
func roundSelectedCoordinates(_ grid: GSGridSettings)
```

```objc
- (void) roundSelectedCoordinates:(GSGridSettings) grid;
```

```python
roundSelectedCoordinates_(grid: GSGridSettings)
```

## Discussion

When the selection is empty, all applicable coordinates are rounded.

## See Also

### Rounding Coordinates

- [`GSLayer roundCoordinates`](/Core/GlyphsCore/GSLayer/roundCoordinates) — Rounds path, component, and anchor coordinates using the associated font master settings.
- [`GSLayer roundCoordinatesToGridWithSettings:`](/Core/GlyphsCore/GSLayer/roundCoordinatesToGridWithSettings:) — Rounds path, component, and anchor coordinates to a grid.
- [`GSLayer roundCoordinatesFastToGridWithSettings:`](/Core/GlyphsCore/GSLayer/roundCoordinatesFastToGridWithSettings:) — Rounds path, component, and anchor coordinates to a grid without normal edit bookkeeping.
- [`GSLayer roundCoordinatesToGrid:`](/Core/GlyphsCore/GSLayer/roundCoordinatesToGrid:) — Rounds shape and anchor coordinates to a uniform grid and rounds the layer width to at most unit precision.
- [`GSLayer roundCoordinatesToGridFast:`](/Core/GlyphsCore/GSLayer/roundCoordinatesToGridFast:) — Rounds shape and anchor coordinates to a uniform grid without normal edit bookkeeping.

