MTKTextureLoader.FromCGImage 方法

定义

重载

FromCGImage(CGImage, MTKTextureLoaderOptions, NSError)

从指定的核心图形图像和选项创建并返回金属纹理。

FromCGImage(CGImage, MTKTextureLoaderOptions, MTKTextureLoaderCallback)

从指定的核心图形图像和选项创建并返回 Metal 纹理,并在完成时运行完成处理程序。

FromCGImage(CGImage, MTKTextureLoaderOptions, NSError)

从指定的核心图形图像和选项创建并返回金属纹理。

public Metal.IMTLTexture FromCGImage (CoreGraphics.CGImage cgImage, MetalKit.MTKTextureLoaderOptions options, out Foundation.NSError error);
member this.FromCGImage : CoreGraphics.CGImage * MetalKit.MTKTextureLoaderOptions *  -> Metal.IMTLTexture

参数

cgImage
CGImage

核心图形图像。

options
MTKTextureLoaderOptions

用于加载纹理数据的选项。

error
NSError

包含错误(如果发生)。

返回

适用于

FromCGImage(CGImage, MTKTextureLoaderOptions, MTKTextureLoaderCallback)

从指定的核心图形图像和选项创建并返回 Metal 纹理,并在完成时运行完成处理程序。

public void FromCGImage (CoreGraphics.CGImage cgImage, MetalKit.MTKTextureLoaderOptions options, MetalKit.MTKTextureLoaderCallback completionHandler);
member this.FromCGImage : CoreGraphics.CGImage * MetalKit.MTKTextureLoaderOptions * MetalKit.MTKTextureLoaderCallback -> unit

参数

cgImage
CGImage

核心图形图像。

options
MTKTextureLoaderOptions

用于加载纹理数据的选项。

completionHandler
MTKTextureLoaderCallback

加载纹理后要运行的处理程序。

适用于