Class RenderingParams
- Namespace
- SharpDX.DirectWrite
- Assembly
- SharpDX.Direct2D1.dll
[Guid("2f0da53a-2add-47cd-82ee-d9ec34688e75")]
public class RenderingParams : ComObject
- Inheritance
-
RenderingParams
- Derived
Constructors
RenderingParams(Factory)
Creates a rendering parameters object with default settings for the primary monitor. Different monitors may have different rendering parameters, for more information see the {{How to Add Support for Multiple Monitors}} topic.
public RenderingParams(Factory factory)
Parameters
RenderingParams(Factory, nint)
Creates a rendering parameters object with default settings for the specified monitor. In most cases, this is the preferred way to create a rendering parameters object.
public RenderingParams(Factory factory, nint monitorHandle)
Parameters
factory
FactoryA reference to a DirectWrite factory Factory
monitorHandle
nintA handle for the specified monitor.
RenderingParams(Factory, float, float, float, PixelGeometry, RenderingMode)
Creates a rendering parameters object with the specified properties.
public RenderingParams(Factory factory, float gamma, float enhancedContrast, float clearTypeLevel, PixelGeometry pixelGeometry, RenderingMode renderingMode)
Parameters
factory
FactoryA reference to a DirectWrite factory Factory
gamma
floatThe gamma level to be set for the new rendering parameters object.
enhancedContrast
floatThe enhanced contrast level to be set for the new rendering parameters object.
clearTypeLevel
floatThe ClearType level to be set for the new rendering parameters object.
pixelGeometry
PixelGeometryRepresents the internal structure of a device pixel (that is, the physical arrangement of red, green, and blue color components) that is assumed for purposes of rendering text.
renderingMode
RenderingModeA value that represents the method (for example, ClearType natural quality) for rendering glyphs.
RenderingParams(nint)
public RenderingParams(nint nativePtr)
Parameters
nativePtr
nint
Properties
ClearTypeLevel
Gets the ClearType level of the rendering parameters object.
public float ClearTypeLevel { get; }
Property Value
Remarks
The ClearType level represents the amount of ClearType ? that is, the degree to which the red, green, and blue subpixels of each pixel are treated differently. Valid values range from zero (meaning no ClearType, which is equivalent to grayscale anti-aliasing) to one (meaning full ClearType)
EnhancedContrast
Gets the enhanced contrast property of the rendering parameters object. Valid values are greater than or equal to zero.
public float EnhancedContrast { get; }
Property Value
Remarks
Enhanced contrast is the amount to increase the darkness of text, and typically ranges from 0 to 1. Zero means no contrast enhancement.
Gamma
Gets the gamma value used for gamma correction. Valid values must be greater than zero and cannot exceed 256.
public float Gamma { get; }
Property Value
Remarks
The gamma value is used for gamma correction, which compensates for the non-linear luminosity response of most monitors.
PixelGeometry
Gets the pixel geometry of the rendering parameters object.
public PixelGeometry PixelGeometry { get; }
Property Value
RenderingMode
Gets the rendering mode of the rendering parameters object.
public RenderingMode RenderingMode { get; }
Property Value
Remarks
By default, the rendering mode is initialized to DWRITE_RENDERING_MODE_DEFAULT, which means the rendering mode is determined automatically based on the font and size. To determine the recommended rendering mode to use for a given font and size and rendering parameters object, use the IDWriteFontFace::GetRecommendedRenderingMode method.
Operators
explicit operator RenderingParams(nint)
public static explicit operator RenderingParams(nint nativePtr)
Parameters
nativePtr
nint