SKImage.FromTexture 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
FromTexture(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType, SKColorSpace, SKImageTextureReleaseDelegate, Object)
從指定的材質建立影像,但不取得所有權。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha, SkiaSharp.SKColorSpace colorspace, SkiaSharp.SKImageTextureReleaseDelegate releaseProc, object releaseContext);
參數
- context
- GRRecordingContext
GPU 的背景。
- texture
- GRBackendTexture
後端的貼圖。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片的顏色類型。
- alpha
- SKAlphaType
影像的 alpha 類型。
- colorspace
- SKColorSpace
影像的色彩空間。
- releaseProc
- SKImageTextureReleaseDelegate
代表在影像發布時可行使。
- releaseContext
- Object
使用者資料要傳給釋放授權者。
傳回
回傳一張新圖片,或 null 是當材質無效時。
適用於
FromTexture(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType, SKColorSpace, SKImageTextureReleaseDelegate)
從指定的材質建立影像,但不取得所有權。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha, SkiaSharp.SKColorSpace colorspace, SkiaSharp.SKImageTextureReleaseDelegate releaseProc);
參數
- context
- GRRecordingContext
GPU 的背景。
- texture
- GRBackendTexture
後端的貼圖。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片的顏色類型。
- alpha
- SKAlphaType
影像的 alpha 類型。
- colorspace
- SKColorSpace
影像的色彩空間。
- releaseProc
- SKImageTextureReleaseDelegate
代表在影像發布時可行使。
傳回
回傳一張新圖片,或 null 是當材質無效時。
適用於
FromTexture(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType, SKColorSpace, SKImageTextureReleaseDelegate)
從指定的材質建立新的影像。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha, SkiaSharp.SKColorSpace colorspace, SkiaSharp.SKImageTextureReleaseDelegate releaseProc);
參數
- context
- GRContext
圖像背景。
- texture
- GRBackendTexture
現有後端貼圖的描述。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片要用什麼顏色類型。
- alpha
- SKAlphaType
用於影像的透明度模式。
- colorspace
- SKColorSpace
影像中要用的色彩空間。
- releaseProc
- SKImageTextureReleaseDelegate
當影像即將被銷毀時,代表要啟動。
傳回
回傳新圖片,或 null 是當指定的材質不支援時回傳。
適用於
FromTexture(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType, SKColorSpace)
從指定的材質建立影像,但不取得所有權。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha, SkiaSharp.SKColorSpace colorspace);
參數
- context
- GRRecordingContext
GPU 的背景。
- texture
- GRBackendTexture
後端的貼圖。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片的顏色類型。
- alpha
- SKAlphaType
影像的 alpha 類型。
- colorspace
- SKColorSpace
影像的色彩空間。
傳回
回傳一張新圖片,或 null 是當材質無效時。
適用於
FromTexture(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType, SKColorSpace)
從指定的材質建立新的影像。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha, SkiaSharp.SKColorSpace colorspace);
參數
- context
- GRContext
圖像背景。
- texture
- GRBackendTexture
現有後端貼圖的描述。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片要用什麼顏色類型。
- alpha
- SKAlphaType
用於影像的透明度模式。
- colorspace
- SKColorSpace
影像中要用的色彩空間。
傳回
回傳新圖片,或 null 是當指定的材質不支援時回傳。
適用於
FromTexture(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType, SKColorSpace, SKImageTextureReleaseDelegate, Object)
從指定的材質建立新的影像。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha, SkiaSharp.SKColorSpace colorspace, SkiaSharp.SKImageTextureReleaseDelegate releaseProc, object releaseContext);
參數
- context
- GRContext
圖像背景。
- texture
- GRBackendTexture
現有後端貼圖的描述。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片要用什麼顏色類型。
- alpha
- SKAlphaType
用於影像的透明度模式。
- colorspace
- SKColorSpace
影像中要用的色彩空間。
- releaseProc
- SKImageTextureReleaseDelegate
當影像即將被銷毀時,代表要啟動。
- releaseContext
- Object
使用者資料在呼叫代理時使用。
傳回
回傳新圖片,或 null 是當指定的材質不支援時回傳。
適用於
FromTexture(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType)
從指定的材質建立新的影像。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha);
參數
- context
- GRContext
圖像背景。
- texture
- GRBackendTexture
現有後端貼圖的描述。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片要用什麼顏色類型。
- alpha
- SKAlphaType
用於影像的透明度模式。
傳回
回傳新圖片,或 null 是當指定的材質不支援時回傳。
適用於
FromTexture(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)
從指定的材質建立影像,但不取得所有權。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);
參數
- context
- GRRecordingContext
GPU 的背景。
- texture
- GRBackendTexture
後端的貼圖。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片的顏色類型。
傳回
回傳一張新圖片,或 null 是當材質無效時。
適用於
FromTexture(GRContext, GRBackendTexture, GRSurfaceOrigin, SKColorType)
從指定的材質建立新的影像。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);
參數
- context
- GRContext
圖像背景。
- texture
- GRBackendTexture
現有後端貼圖的描述。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片要用什麼顏色類型。
傳回
回傳新圖片,或 null 是當指定的材質不支援時回傳。
適用於
FromTexture(GRRecordingContext, GRBackendTexture, SKColorType)
從指定的材質建立影像,但不取得所有權。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType);
參數
- context
- GRRecordingContext
GPU 的背景。
- texture
- GRBackendTexture
後端的貼圖。
- colorType
- SKColorType
圖片的顏色類型。
傳回
回傳一張新圖片,或 null 是當材質無效時。
適用於
FromTexture(GRContext, GRBackendTexture, SKColorType)
從指定的材質建立新的影像。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.SKColorType colorType);
參數
- context
- GRContext
圖像背景。
- texture
- GRBackendTexture
現有後端貼圖的描述。
- colorType
- SKColorType
圖片要用什麼顏色類型。
傳回
回傳新圖片,或 null 是當指定的材質不支援時回傳。
適用於
FromTexture(GRRecordingContext, GRBackendTexture, GRSurfaceOrigin, SKColorType, SKAlphaType)
從指定的材質建立影像,但不取得所有權。
public static SkiaSharp.SKImage FromTexture(SkiaSharp.GRRecordingContext context, SkiaSharp.GRBackendTexture texture, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.SKAlphaType alpha);
參數
- context
- GRRecordingContext
GPU 的背景。
- texture
- GRBackendTexture
後端的貼圖。
- origin
- GRSurfaceOrigin
質地的起源。
- colorType
- SKColorType
圖片的顏色類型。
- alpha
- SKAlphaType
影像的 alpha 類型。
傳回
回傳一張新圖片,或 null 是當材質無效時。