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,採用創用CC Attribution-ShareAlike 授權: https://creativecommons.org/licenses/by-sa/3.0/
建構函式
| 名稱 | Description |
|---|---|
| CIPerspectiveTransformWithExtent() |
建立一個預設值的新版本 CIPerspectiveTransformWithExtent 。 |
| CIPerspectiveTransformWithExtent(NativeHandle) |
一種用於建立未受管理物件的受管理表示的建構器。 由執行時呼叫。 |
| CIPerspectiveTransformWithExtent(NSCoder) |
一個建構器,能從未封存物件中儲存的資料初始化物件。 |
| CIPerspectiveTransformWithExtent(NSObjectFlag) |
用來呼叫衍生類別跳過初始化,僅僅配置物件。 |
屬性
| 名稱 | Description |
|---|---|
| AccessibilityAttributedUserInputLabels |
一種濾鏡,會根據透視變換改變整體影像的一部分。 (繼承來源 NSObject) |
| AccessibilityRespondsToUserInteraction |
一種濾鏡,會根據透視變換改變整體影像的一部分。 (繼承來源 NSObject) |
| AccessibilityTextualContext |
一種濾鏡,會根據透視變換改變整體影像的一部分。 (繼承來源 NSObject) |
| AccessibilityUserInputLabels |
一種濾鏡,會根據透視變換改變整體影像的一部分。 (繼承來源 NSObject) |
| Attributes |
過濾器的可設定屬性。 (繼承來源 CIFilter) |
| Class |
一種濾鏡,會根據透視變換改變整體影像的一部分。 (繼承來源 NSObject) |
| ClassHandle |
Objective-C 類別是這個類別的處理方式。 (繼承來源 CIFilter) |
| DebugDescription |
一種濾鏡,會根據透視變換改變整體影像的一部分。 (繼承來源 NSObject) |
| Description |
一種濾鏡,會根據透視變換改變整體影像的一部分。 (繼承來源 NSObject) |
| ExposedBindings |
一種濾鏡,會根據透視變換改變整體影像的一部分。 (繼承來源 NSObject) |
| Handle |
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 |
用 handle 表示此 NSObject基底類別中的方法。 (繼承來源 NSObject) |
| Zone |
一種濾鏡,會根據透視變換改變整體影像的一部分。 (繼承來源 NSObject) |