# `GSGlyphEditView zoomToRect:padding:`

*Instance Method*

Zooms to fit the given rect and scrolls it into the center of the frame.

## Declaration

```swift
func zoom(to rect: NSRect, padding withPadding: Bool)
```

```objc
- (void) zoomToRect:(NSRect) rect padding:(BOOL) withPadding;
```

```python
zoomToRect_padding_(rect: NSRect, withPadding: bool)
```

## Parameters

- `rect` — The target rect in view coordinates.
- `withPadding` — Whether to surround the rect with the standard padding.

