pub unsafe trait CIStretchCrop: CIFilterProtocol {
// Provided methods
unsafe fn inputImage(&self) -> Option<Retained<CIImage>>
where Self: Sized + Message { ... }
unsafe fn setInputImage(&self, input_image: Option<&CIImage>)
where Self: Sized + Message { ... }
unsafe fn size(&self) -> CGPoint
where Self: Sized + Message { ... }
unsafe fn setSize(&self, size: CGPoint)
where Self: Sized + Message { ... }
unsafe fn cropAmount(&self) -> c_float
where Self: Sized + Message { ... }
unsafe fn setCropAmount(&self, crop_amount: c_float)
where Self: Sized + Message { ... }
unsafe fn centerStretchAmount(&self) -> c_float
where Self: Sized + Message { ... }
unsafe fn setCenterStretchAmount(&self, center_stretch_amount: c_float)
where Self: Sized + Message { ... }
}Available on crate features
CIFilter and CIFilterBuiltins only.Expand description
The protocol for the Stretch Crop filter.
Distorts an image by stretching and or cropping to fit a target size.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn inputImage(&self) -> Option<Retained<CIImage>>
Available on crate feature CIImage only.
unsafe fn inputImage(&self) -> Option<Retained<CIImage>>
CIImage only.The image to use as an input for the effect.
Sourceunsafe fn setInputImage(&self, input_image: Option<&CIImage>)
Available on crate feature CIImage only.
unsafe fn setInputImage(&self, input_image: Option<&CIImage>)
CIImage only.Setter for inputImage.
Sourceunsafe fn size(&self) -> CGPoint
Available on crate feature objc2-core-foundation only.
unsafe fn size(&self) -> CGPoint
objc2-core-foundation only.The size in pixels of the output image.
Sourceunsafe fn setSize(&self, size: CGPoint)
Available on crate feature objc2-core-foundation only.
unsafe fn setSize(&self, size: CGPoint)
objc2-core-foundation only.Setter for size.
Sourceunsafe fn cropAmount(&self) -> c_float
unsafe fn cropAmount(&self) -> c_float
Determines if and how much cropping should be used to achieve the target size. If value is 0 then only stretching is used. If 1 then only cropping is used.
Sourceunsafe fn setCropAmount(&self, crop_amount: c_float)
unsafe fn setCropAmount(&self, crop_amount: c_float)
Setter for cropAmount.
Sourceunsafe fn centerStretchAmount(&self) -> c_float
unsafe fn centerStretchAmount(&self) -> c_float
Determine how much the center of the image is stretched if stretching is used. If value is 0 then the center of the image maintains the original aspect ratio. If 1 then the image is stretched uniformly.
Sourceunsafe fn setCenterStretchAmount(&self, center_stretch_amount: c_float)
unsafe fn setCenterStretchAmount(&self, center_stretch_amount: c_float)
Setter for centerStretchAmount.