Condividi tramite


Manager.CheckDeviceFormatConversion Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Tests a device to determine whether it supports conversion from one display format to another.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Shared Function CheckDeviceFormatConversion ( _
    adapter As Integer, _
    deviceType As DeviceType, _
    sourceFormat As Format, _
    destFormat As Format _
) As Boolean
'Usage
Dim adapter As Integer
Dim deviceType As DeviceType
Dim sourceFormat As Format
Dim destFormat As Format
Dim returnValue As Boolean

returnValue = Manager.CheckDeviceFormatConversion(adapter, _
    deviceType, sourceFormat, destFormat)
public static bool CheckDeviceFormatConversion(
    int adapter,
    DeviceType deviceType,
    Format sourceFormat,
    Format destFormat
)
public:
static bool CheckDeviceFormatConversion(
    int adapter, 
    DeviceType deviceType, 
    Format sourceFormat, 
    Format destFormat
)
static member CheckDeviceFormatConversion : 
        adapter:int * 
        deviceType:DeviceType * 
        sourceFormat:Format * 
        destFormat:Format -> bool 

Parameters

Return Value

Type: System.Boolean
true if the method succeeds; otherwise, false.

Remarks

Using CheckDeviceType to test for compatibility between a back buffer and the display format returns appropriate values. This means that the call reflects device capabilities. If the device cannot render to the requested back buffer format, the call still returns NotAvailable from the ResultCode enumeration. If the device can render to the format but cannot perform the color-converting presentation, the return value is also NotAvailable. Applications can discover hardware support for the presentation itself by calling CheckDeviceFormatConversion. No software emulation for the color-converting presentation itself is offered.

CheckDeviceFormatConversion also can be used to determine which combinations of source surface formats and destination surface formats are permissible in calls to Device.StretchRectangle.

The color conversion source format must be a four-character code (FOURCC) format or a valid back buffer format. The target format must be one of the following unsigned formats:

X1R5G5B5

X1R5G5B5

R5G6B5

R8G8B8

R8G8B8

A8R8G8B8

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Manager Class

Manager Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace