<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/circularWrap()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)circularWrapFilter"
  },
  "title" : "circularWrap()"
}
-->

# circularWrap()

Distorts an image by increasing the distance of the center of the image.

```
class func circularWrap() -> any CIFilter & CICircularWrap
```

## Return Value

The distorted image.

## Discussion

This method applies the circular wrap filter to an image. This effect wraps an image around a transparent circle. The distortion of the image increases with the distance from the center of the circle.

The circular wrap filter uses the following properties:

- `inputImage`: An image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `angle`: A `float` representing the angle of the wrap, in radians, as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `radius`: A `float` representing the amount of pixels the filter uses to create the distortion as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `center`: A set of coordinates marking the center of the image as a <doc://com.apple.documentation/documentation/CoreFoundation/CGPoint>.

The following code creates a filter that results in a circular image generated from the input image:

```swift
func circularWrap(inputImage: CIImage) -> CIImage {    let filter = CIFilter.circularWrap()
    filter.inputImage = inputImage
    filter.center = CGPoint(
        x: inputImage.extent.size.width/2,
        y: inputImage.extent.size.height/2
    )
    filter.angle = .pi
    filter.radius = 90
    return filter.outputImage!
}

let text = CIFilter.textImageGenerator()
text.text = "Core Image"
text.fontSize = 100
text.fontName = "Chalkboard"
text.outputImage!
circularWrap(inputImage: text.outputImage!)
```

![On the left, an image with the text “Core Image”. On the right, the same image with the text wrapped around a circle.](images/com.apple.coreimage/media-4407319@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)