---
title: "draw(in:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiimage/draw(in:)"
---

# draw(in:)

Draws the entire image in the specified rectangle, scaling it as necessary to fit.

## Declaration

```swift
func draw(in rect: CGRect)
```

## Parameters

- `rect`: The rectangle (in the coordinate system of the graphics context) in which to draw the image.

## Discussion

Discussion This method draws the entire image in the current graphics context, respecting the image’s orientation setting. In the default coordinate system, images are situated down and to the right of the origin of the specified rectangle. This method respects any transforms applied to the current graphics context, however. This method draws the image at full opacity using the CGBlendMode.normal blend mode.

## See Also

### Drawing images

- [draw(at:)](uikit/uiimage/draw(at:).md)
- [draw(at:blendMode:alpha:)](uikit/uiimage/draw(at:blendmode:alpha:).md)
- [draw(in:blendMode:alpha:)](uikit/uiimage/draw(in:blendmode:alpha:).md)
- [drawAsPattern(in:)](uikit/uiimage/drawaspattern(in:).md)
