CIStretchCrop

Trait CIStretchCrop 

Source
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§

Source

unsafe fn inputImage(&self) -> Option<Retained<CIImage>>
where Self: Sized + Message,

Available on crate feature CIImage only.

The image to use as an input for the effect.

Source

unsafe fn setInputImage(&self, input_image: Option<&CIImage>)
where Self: Sized + Message,

Available on crate feature CIImage only.

Setter for inputImage.

Source

unsafe fn size(&self) -> CGPoint
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

The size in pixels of the output image.

Source

unsafe fn setSize(&self, size: CGPoint)
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

Setter for size.

Source

unsafe fn cropAmount(&self) -> c_float
where Self: Sized + Message,

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.

Source

unsafe fn setCropAmount(&self, crop_amount: c_float)
where Self: Sized + Message,

Setter for cropAmount.

Source

unsafe fn centerStretchAmount(&self) -> c_float
where Self: Sized + Message,

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.

Source

unsafe fn setCenterStretchAmount(&self, center_stretch_amount: c_float)
where Self: Sized + Message,

Setter for centerStretchAmount.

Trait Implementations§

Source§

impl ProtocolType for dyn CIStretchCrop

Source§

const NAME: &'static str = "CIStretchCrop"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn CIStretchCrop
where T: ?Sized + Message + CIStretchCrop,

Implementations on Foreign Types§

Source§

impl<T> CIStretchCrop for ProtocolObject<T>
where T: ?Sized + CIStretchCrop,

Implementors§