CIPerspectiveTransformWithExtent 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
基于透视转换更改图像总部分的筛选器。
public class CIPerspectiveTransformWithExtent : CoreImage.CIPerspectiveTransform, CoreImage.ICIPerspectiveTransformWithExtentProtocol, IDisposable
type CIPerspectiveTransformWithExtent = class
inherit CIPerspectiveTransform
interface ICIPerspectiveTransformWithExtentProtocol
interface INativeObject
interface IDisposable
interface ICIFilterProtocol
interface ICIFourCoordinateGeometryFilterProtocol
- 继承
- 实现
注解
以下示例显示正在使用的此筛选器
// Create the CIImage from a file
CIImage heron = CIImage.FromCGImage (UIImage.FromFile ("heron.jpg").CGImage);
var extent = heron.Extent;
// Create a CIPerspectiveTransformWithExtent filter with the input image
var perspective_transform_with_extent = new CIPerspectiveTransformWithExtent () {
Image = heron,
BottomLeft = new CIVector (extent.Left + 70, extent.Top + 20),
BottomRight = new CIVector (extent.Right - 70, extent.Top - 20),
TopLeft = new CIVector (extent.Left - 70, extent.Bottom - 20),
TopRight = new CIVector (extent.Right + 70, extent.Bottom + 20),
Extent = new CIVector (new float [] {extent.X + 100, extent.Y + 100, extent.Width - 100, extent.Height - 100})
};
// Get the altered image from the filter
var output = perspective_transform_with_extent.OutputImage;
// To render the results, we need to create a context, and then
// use one of the context rendering APIs, in this case, we render the
// result into a CoreGraphics image, which is merely a useful representation
//
var context = CIContext.FromOptions (null);
var cgimage = context.CreateCGImage (output, output.Extent);
// The above cgimage can be added to a screen view, for example, this
// would add it to a UIImageView on the screen:
myImageView.Image = UIImage.FromImage (cgimage);
使用以下图像输入:

生成以下输出:

“canon” © 2012 cuatrok77 hernandez,在 Creative Commons Attribution-ShareAlike 许可证下使用: https://creativecommons.org/licenses/by-sa/3.0/
构造函数
| 名称 | 说明 |
|---|---|
| CIPerspectiveTransformWithExtent() |
CIPerspectiveTransformWithExtent使用默认值创建新项。 |
| CIPerspectiveTransformWithExtent(NativeHandle) |
创建非托管对象的托管表示形式时使用的构造函数。 由运行时调用。 |
| CIPerspectiveTransformWithExtent(NSCoder) |
一个构造函数,用于从存储在 unarchiver 对象中的数据初始化对象。 |
| CIPerspectiveTransformWithExtent(NSObjectFlag) |
要调用派生类的构造函数,以跳过初始化,并仅分配对象。 |
属性
| 名称 | 说明 |
|---|---|
| AccessibilityAttributedUserInputLabels |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| AccessibilityRespondsToUserInteraction |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| AccessibilityTextualContext |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| AccessibilityUserInputLabels |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| Attributes |
筛选器的可配置属性。 (继承自 CIFilter) |
| Class |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| ClassHandle |
此类的 Objective-C 类句柄。 (继承自 CIFilter) |
| DebugDescription |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| Description |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| ExposedBindings |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| Handle |
处理(指针)到非托管对象表示形式。 (继承自 NSObject) |
| InputBottomLeft |
基于透视转换更改图像总部分的筛选器。 |
| InputBottomRight |
基于透视转换更改图像总部分的筛选器。 |
| InputExtent |
获取或设置要转换为目标映像的源映像中的区域。 |
| InputImage |
获取或设置要筛选的图像。 |
| InputKeys |
获取一个数组,该数组包含筛选器的输入键的名称。 (继承自 CIFilter) |
| InputTopLeft |
基于透视转换更改图像总部分的筛选器。 |
| InputTopRight |
基于透视转换更改图像总部分的筛选器。 |
| IsDirectBinding |
获取或设置一个值,该值指示此实例是否使用直接 Objective-C 绑定。 (继承自 NSObject) |
| IsProxy |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| Item[NSString] |
获取由 |
| Name |
获取筛选器名称。 (继承自 CIFilter) |
| OutputImage |
基于透视转换更改图像总部分的筛选器。 |
| OutputKeys |
获取一个数组,其中包含筛选器的输出键的名称。 (继承自 CIFilter) |
| OutputTransform |
基于透视转换更改图像总部分的筛选器。 (继承自 CIPerspectiveTransform) |
| RetainCount |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| Self |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| Superclass |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |
| SuperHandle |
用于表示此 NSObject基类中方法的句柄。 (继承自 NSObject) |
| Zone |
基于透视转换更改图像总部分的筛选器。 (继承自 NSObject) |