Table of Contents

Class ScreenCapture

Namespace
HelixToolkit.SharpDX.Utilities
Assembly
HelixToolkit.SharpDX.dll
public static class ScreenCapture
Inheritance
ScreenCapture
Inherited Members

Methods

CaptureTexture(DeviceContext, Texture2D?, out Texture2D?)

Captures the texture.

public static bool CaptureTexture(DeviceContext context, Texture2D? source, out Texture2D? stagingTexture)

Parameters

context DeviceContext

The context.

source Texture2D

The source.

stagingTexture Texture2D

The staging texture.

Returns

bool

SaveWICTextureToBitmapStream(IDeviceResources, Texture2D?, MemoryStream)

Saves the wic texture to bitmap stream.

public static bool SaveWICTextureToBitmapStream(IDeviceResources deviceResource, Texture2D? source, MemoryStream bitmapStream)

Parameters

deviceResource IDeviceResources

The device resource.

source Texture2D

The source.

bitmapStream MemoryStream

The bitmap stream.

Returns

bool

Exceptions

NotSupportedException

SaveWICTextureToFile(IDeviceResources, Texture2D?, string, Direct2DImageFormat)

Saves the wic texture to file.

public static bool SaveWICTextureToFile(IDeviceResources deviceResource, Texture2D? source, string file, Direct2DImageFormat format)

Parameters

deviceResource IDeviceResources

The device resource.

source Texture2D

The source.

file string

The file.

format Direct2DImageFormat

The format.

Returns

bool

SaveWICTextureToFile(IDeviceResources, Texture2D?, string, Guid)

Saves the wic texture to file.

public static bool SaveWICTextureToFile(IDeviceResources deviceResource, Texture2D? source, string fileName, Guid containerFormat)

Parameters

deviceResource IDeviceResources

The device resource.

source Texture2D

The source.

fileName string

Name of the file.

containerFormat Guid

The container format.

Returns

bool

Exceptions

NotSupportedException