---
title: blurredRectangleGenerator()
framework: coreimage
role: symbol
role_heading: Type Method
path: coreimage/cifilter-swift.class/blurredrectanglegenerator()
---

# blurredRectangleGenerator()

Generates a blurred rectangle.

## Declaration

```swift
class func blurredRectangleGenerator() -> any CIFilter & CIBlurredRectangleGenerator
```

## Return Value

Return Value A CIImage containing a blurred rectangle.

## Discussion

Discussion Creates a CIImage containing a blurred rectangle. The resulting image size is the extent of the rectangle plus any additional space required for the blur effect. The blurred rectangle filter uses the following properties: The following code creates a filter that generates a blurred red rectangle with a width of 200 x 100 pixels. func blurredRectangle() -> CIImage {     let filter = CIFilter.blurredRectangleGenerator()     filter.extent = CGRect(x: 0, y: 0, width: 200, height: 100)     filter.color = CIColor.red     filter.sigma = 10.0     return filter.outputImage! }

## See Also

### Filters

- [attributedTextImageGenerator()](coreimage/cifilter-swift.class/attributedtextimagegenerator().md)
- [aztecCodeGenerator()](coreimage/cifilter-swift.class/azteccodegenerator().md)
- [barcodeGenerator()](coreimage/cifilter-swift.class/barcodegenerator().md)
- [checkerboardGenerator()](coreimage/cifilter-swift.class/checkerboardgenerator().md)
- [code128BarcodeGenerator()](coreimage/cifilter-swift.class/code128barcodegenerator().md)
- [lenticularHaloGenerator()](coreimage/cifilter-swift.class/lenticularhalogenerator().md)
- [meshGenerator()](coreimage/cifilter-swift.class/meshgenerator().md)
- [pdf417BarcodeGenerator()](coreimage/cifilter-swift.class/pdf417barcodegenerator().md)
- [qrCodeGenerator()](coreimage/cifilter-swift.class/qrcodegenerator().md)
- [randomGenerator()](coreimage/cifilter-swift.class/randomgenerator().md)
- [roundedRectangleGenerator()](coreimage/cifilter-swift.class/roundedrectanglegenerator().md)
- [roundedRectangleStrokeGenerator()](coreimage/cifilter-swift.class/roundedrectanglestrokegenerator().md)
- [starShineGenerator()](coreimage/cifilter-swift.class/starshinegenerator().md)
- [stripesGenerator()](coreimage/cifilter-swift.class/stripesgenerator().md)
- [sunbeamsGenerator()](coreimage/cifilter-swift.class/sunbeamsgenerator().md)
