---
title: "draw(_:at:from:)"
framework: coreimage
role: symbol
role_heading: Instance Method
path: "coreimage/cicontext/draw(_:at:from:)"
---

# draw(_:at:from:)

Renders a region of an image to a point in the context destination.

## Declaration

```swift
func draw(_ image: CIImage, at atPoint: CGPoint, from fromRect: CGRect)
```

## Parameters

- `image`: A Core Image image object.
- `atPoint`: The point in the context destination to draw to.
- `fromRect`: The region of the image to draw.

## Discussion

Discussion This method because it is ambiguous as to the units of the dimensions and won’t work as expected in a high-resolution environment which is why you should use drawImage:inRect:fromRect: instead. On iOS platforms, this method draws the image onto a render buffer for the OpenGL ES context. Use this method only if the CIContext object is created with contextWithEAGLContext:, and hence, you are rendering to a CAEAGLLayer.

## See Also

### Deprecated

- [init(cglContext:pixelFormat:colorSpace:options:)](coreimage/cicontext/init(cglcontext:pixelformat:colorspace:options:)-6rp6d.md)
- [init(eaglContext:)](coreimage/cicontext/init(eaglcontext:)-8ajef.md)
- [init(eaglContext:options:)](coreimage/cicontext/init(eaglcontext:options:)-6uyqj.md)
- [init(forOfflineGPUAtIndex:)](coreimage/cicontext/init(forofflinegpuatindex:).md)
- [init(forOfflineGPUAtIndex:colorSpace:options:sharedContext:)](coreimage/cicontext/init(forofflinegpuatindex:colorspace:options:sharedcontext:).md)
- [createCGLayer(with:info:)](coreimage/cicontext/createcglayer(with:info:).md)
