Table of Contents

Struct DeviceContextProperties

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

Contains rendering options (hardware or software), pixel format, DPI information, remoting options, and Direct3D support requirements for a device context.
D2D1_RENDER_TARGET_PROPERTIES

public struct DeviceContextProperties : IEquatable<DeviceContextProperties>
Implements
Inherited Members

Constructors

DeviceContextProperties(DeviceContextType, DevicePixelFormat, Vector2Float, DeviceContextUsage, DeviceFeatureLevel)
DeviceContextProperties(DeviceContextType, DevicePixelFormat, float, float, DeviceContextUsage, DeviceFeatureLevel)

Properties

Default
Dpi

The DPI of the render target. To use the default DPI, set this to (0, 0).

MinLevel

A value that specifies the minimum Direct3D feature level required for hardware rendering. If the specified minimum level is not available, the device context uses software rendering if the type member is set to Default; if type is set to Hardware, device context creation fails. A value of Default indicates that Direct2D should determine whether the Direct3D feature level of the device is adequate. This field is used only when creating IHwndDeviceContext and IDCDeviceContext objects.

PixelFormat

The pixel format and alpha mode of the render target. You can use Unknown to specify that Direct2D should select the pixel format and alpha mode for you.
For a list of pixel formats and alpha modes supported by each render target, see Supported Pixel Formats and Alpha Modes.

Type

A value that specifies whether the render target should force hardware or software rendering. A value of Default specifies that the render target should use hardware rendering if it is available; otherwise, it uses software rendering. Note that WIC bitmap render targets do not support hardware rendering.

Usage

A value that specifies how the device context is remoted and whether it should be GDI-compatible. Set to None to create a render target that is not compatible with GDI and uses Direct3D command-stream remoting if it is available.

Methods

Equals(DeviceContextProperties)
Equals(in DeviceContextProperties)
Equals(object?)
GetHashCode()

Operators

operator ==(in DeviceContextProperties, in DeviceContextProperties)
operator !=(in DeviceContextProperties, in DeviceContextProperties)