# `GSPenProtocol setGradient:bounds:`

*Instance Method*

## Declaration

```swift
optional func setGradient(_ gradient: GSGradient!, bounds: NSRect)
```

```objc
- (void) setGradient:(GSGradient *) gradient bounds:(NSRect) bounds;
```

```python
setGradient_bounds_(gradient: GSGradient, bounds: NSRect)
```

