CIFilter_DistortionEffect_StretchCrop - linhay/Stem GitHub Wiki

CIFilter.DistortionEffect.StretchCrop

and later and in iOS 9 and later.

public struct StretchCrop: CIFilterContainerProtocol

Inheritance

CIFilterContainerProtocol

Initializers

init()

init()

Properties

filter

var filter: CIFilter

image

A CIImage object whose display name is Image.

var image: CIImage?

size

A CIVector object whose display name is Size. This value specifies the size of the output image in pixels.

var size: CIVector?

cropAmount

An NSNumber object whose display name is CropAmount. This value determines if, and how much, cropping should be used to achieve the target size. If the value is 0, the image is stretched but not cropped. If the value is 1, the image is cropped but not stretched. Values in-between use stretching and cropping proportionally.

var cropAmount: NSNumber?

centerStretchAmount

An NSNumber object whose display name is CenterStretchAmount. This value determines how much stretching to apply to the center of the image, if stretching is indicated by the inputCropAmount value. A value of 0 causes the center of the image to maintain its original aspect ratio. A value of 1 causes the image to be stretched uniformly.

var centerStretchAmount: NSNumber?