Class D2D1RenderTarget
Represents an object that can receive drawing commands.
Inheritance
Inherited Members
Namespace: JeremyAnsel.DirectX.D2D1
Assembly: JeremyAnsel.DirectX.D2D1.dll
Syntax
public abstract class D2D1RenderTarget : D2D1Resource, IDisposable, ID2D1Releasable
Properties
| Edit this page View SourceAntialiasMode
Gets or sets the current antialiasing mode for nontext drawing operations.
Declaration
public D2D1AntialiasMode AntialiasMode { get; set; }
Property Value
Type | Description |
---|---|
D2D1AntialiasMode |
MaximumBitmapSize
Gets the maximum size, in device-dependent units (pixels), of any one bitmap dimension supported by the render target.
Declaration
public uint MaximumBitmapSize { get; }
Property Value
Type | Description |
---|---|
uint |
PixelFormat
Gets the pixel format and alpha mode of the render target.
Declaration
public D2D1PixelFormat PixelFormat { get; }
Property Value
Type | Description |
---|---|
D2D1PixelFormat |
PixelSize
Gets the size of the render target in device pixels.
Declaration
public D2D1SizeU PixelSize { get; }
Property Value
Type | Description |
---|---|
D2D1SizeU |
Size
Gets the size of the render target in device-independent pixels.
Declaration
public D2D1SizeF Size { get; }
Property Value
Type | Description |
---|---|
D2D1SizeF |
TextAntialiasMode
Gets or sets the current antialiasing mode for text and glyph drawing operations.
Declaration
public D2D1TextAntialiasMode TextAntialiasMode { get; set; }
Property Value
Type | Description |
---|---|
D2D1TextAntialiasMode |
Transform
Gets or sets the current transform of the render target.
Declaration
public D2D1Matrix3X2F Transform { get; set; }
Property Value
Type | Description |
---|---|
D2D1Matrix3X2F |
Methods
| Edit this page View SourceBeginDraw()
Initiates drawing on this render target.
Declaration
public void BeginDraw()
Clear()
Clears the drawing area to the specified color.
Declaration
public void Clear()
Clear(D2D1ColorF)
Clears the drawing area to the specified color.
Declaration
public void Clear(D2D1ColorF clearColor)
Parameters
Type | Name | Description |
---|---|---|
D2D1ColorF | clearColor | The color to which the drawing area is cleared. |
CreateBitmap(D2D1SizeU, D2D1BitmapProperties)
Creates a Direct2D bitmap from a pointer to in-memory source data.
Declaration
public D2D1Bitmap CreateBitmap(D2D1SizeU size, D2D1BitmapProperties bitmapProperties)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeU | size | The dimension of the bitmap to create in pixels. |
D2D1BitmapProperties | bitmapProperties | The pixel format and dots per inch (DPI) of the bitmap to create. |
Returns
Type | Description |
---|---|
D2D1Bitmap | The new bitmap. |
CreateBitmap(D2D1SizeU, byte[], uint, D2D1BitmapProperties)
Creates a Direct2D bitmap from a pointer to in-memory source data.
Declaration
public D2D1Bitmap CreateBitmap(D2D1SizeU size, byte[] srcData, uint pitch, D2D1BitmapProperties bitmapProperties)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeU | size | The dimension of the bitmap to create in pixels. |
byte[] | srcData | The image data, or null to create an uninitialized bitmap. |
uint | pitch | The byte count of each scanline, which is equal to |
D2D1BitmapProperties | bitmapProperties | The pixel format and dots per inch (DPI) of the bitmap to create. |
Returns
Type | Description |
---|---|
D2D1Bitmap | The new bitmap. |
CreateBitmap(D2D1SizeU, nint, uint, D2D1BitmapProperties)
Creates a Direct2D bitmap from a pointer to in-memory source data.
Declaration
public D2D1Bitmap CreateBitmap(D2D1SizeU size, nint srcData, uint pitch, D2D1BitmapProperties bitmapProperties)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeU | size | The dimension of the bitmap to create in pixels. |
nint | srcData | A pointer to the memory location of the image data, or NULL to create an uninitialized bitmap. |
uint | pitch | The byte count of each scanline, which is equal to |
D2D1BitmapProperties | bitmapProperties | The pixel format and dots per inch (DPI) of the bitmap to create. |
Returns
Type | Description |
---|---|
D2D1Bitmap | The new bitmap. |
CreateBitmapBrush(D2D1Bitmap)
Creates an D2D1BitmapBrush from the specified bitmap.
Declaration
public D2D1BitmapBrush CreateBitmapBrush(D2D1Bitmap bitmap)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | bitmap | The bitmap contents of the new brush. |
Returns
Type | Description |
---|---|
D2D1BitmapBrush | The new brush. |
CreateBitmapBrush(D2D1Bitmap, D2D1BitmapBrushProperties)
Creates an D2D1BitmapBrush from the specified bitmap.
Declaration
public D2D1BitmapBrush CreateBitmapBrush(D2D1Bitmap bitmap, D2D1BitmapBrushProperties bitmapBrushProperties)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | bitmap | The bitmap contents of the new brush. |
D2D1BitmapBrushProperties | bitmapBrushProperties | The extend modes and interpolation mode of the new brush. |
Returns
Type | Description |
---|---|
D2D1BitmapBrush | The new brush. |
CreateBitmapBrush(D2D1Bitmap, D2D1BitmapBrushProperties, D2D1BrushProperties)
Creates an D2D1BitmapBrush from the specified bitmap.
Declaration
public D2D1BitmapBrush CreateBitmapBrush(D2D1Bitmap bitmap, D2D1BitmapBrushProperties bitmapBrushProperties, D2D1BrushProperties brushProperties)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | bitmap | The bitmap contents of the new brush. |
D2D1BitmapBrushProperties | bitmapBrushProperties | The extend modes and interpolation mode of the new brush. |
D2D1BrushProperties | brushProperties | A structure that contains the opacity and transform of the new brush. |
Returns
Type | Description |
---|---|
D2D1BitmapBrush | The new brush. |
CreateBitmapFromWicBitmap(object)
Creates an D2D1Bitmap by copying the specified Microsoft Windows Imaging Component (WIC) bitmap.
Declaration
public D2D1Bitmap CreateBitmapFromWicBitmap(object wicBitmapSource)
Parameters
Type | Name | Description |
---|---|---|
object | wicBitmapSource | The WIC bitmap to copy. |
Returns
Type | Description |
---|---|
D2D1Bitmap | The new bitmap. |
CreateBitmapFromWicBitmap(object, D2D1BitmapProperties)
Creates an D2D1Bitmap by copying the specified Microsoft Windows Imaging Component (WIC) bitmap.
Declaration
public D2D1Bitmap CreateBitmapFromWicBitmap(object wicBitmapSource, D2D1BitmapProperties bitmapProperties)
Parameters
Type | Name | Description |
---|---|---|
object | wicBitmapSource | The WIC bitmap to copy. |
D2D1BitmapProperties | bitmapProperties | The pixel format and DPI of the bitmap to create. |
Returns
Type | Description |
---|---|
D2D1Bitmap | The new bitmap. |
CreateCompatibleRenderTarget()
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget()
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1CompatibleRenderTargetOptions)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1CompatibleRenderTargetOptions options)
Parameters
Type | Name | Description |
---|---|---|
D2D1CompatibleRenderTargetOptions | options | A value that specifies whether the new render target must be compatible with GDI. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1PixelFormat, D2D1CompatibleRenderTargetOptions)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1PixelFormat desiredFormat, D2D1CompatibleRenderTargetOptions options)
Parameters
Type | Name | Description |
---|---|---|
D2D1PixelFormat | desiredFormat | The desired pixel format and alpha mode of the new render target. |
D2D1CompatibleRenderTargetOptions | options | A value that specifies whether the new render target must be compatible with GDI. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1SizeF)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | desiredSize | The desired size of the new render target in device-independent pixels if it should be different from the original render target. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1SizeF, D2D1CompatibleRenderTargetOptions)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1CompatibleRenderTargetOptions options)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | desiredSize | The desired size of the new render target in device-independent pixels if it should be different from the original render target. |
D2D1CompatibleRenderTargetOptions | options | A value that specifies whether the new render target must be compatible with GDI. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1SizeF, D2D1PixelFormat, D2D1CompatibleRenderTargetOptions)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1PixelFormat desiredFormat, D2D1CompatibleRenderTargetOptions options)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | desiredSize | The desired size of the new render target in device-independent pixels if it should be different from the original render target. |
D2D1PixelFormat | desiredFormat | The desired pixel format and alpha mode of the new render target. |
D2D1CompatibleRenderTargetOptions | options | A value that specifies whether the new render target must be compatible with GDI. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1SizeF, D2D1SizeU)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1SizeU desiredPixelSize)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | desiredSize | The desired size of the new render target in device-independent pixels if it should be different from the original render target. |
D2D1SizeU | desiredPixelSize | The desired size of the new render target in pixels if it should be different from the original render target. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1SizeF, D2D1SizeU, D2D1CompatibleRenderTargetOptions)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1SizeU desiredPixelSize, D2D1CompatibleRenderTargetOptions options)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | desiredSize | The desired size of the new render target in device-independent pixels if it should be different from the original render target. |
D2D1SizeU | desiredPixelSize | The desired size of the new render target in pixels if it should be different from the original render target. |
D2D1CompatibleRenderTargetOptions | options | A value that specifies whether the new render target must be compatible with GDI. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1SizeF, D2D1SizeU, D2D1PixelFormat)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1SizeU desiredPixelSize, D2D1PixelFormat desiredFormat)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | desiredSize | The desired size of the new render target in device-independent pixels if it should be different from the original render target. |
D2D1SizeU | desiredPixelSize | The desired size of the new render target in pixels if it should be different from the original render target. |
D2D1PixelFormat | desiredFormat | The desired pixel format and alpha mode of the new render target. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1SizeF, D2D1SizeU, D2D1PixelFormat, D2D1CompatibleRenderTargetOptions)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeF desiredSize, D2D1SizeU desiredPixelSize, D2D1PixelFormat desiredFormat, D2D1CompatibleRenderTargetOptions options)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | desiredSize | The desired size of the new render target in device-independent pixels if it should be different from the original render target. |
D2D1SizeU | desiredPixelSize | The desired size of the new render target in pixels if it should be different from the original render target. |
D2D1PixelFormat | desiredFormat | The desired pixel format and alpha mode of the new render target. |
D2D1CompatibleRenderTargetOptions | options | A value that specifies whether the new render target must be compatible with GDI. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1SizeU, D2D1CompatibleRenderTargetOptions)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeU desiredPixelSize, D2D1CompatibleRenderTargetOptions options)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeU | desiredPixelSize | The desired size of the new render target in pixels if it should be different from the original render target. |
D2D1CompatibleRenderTargetOptions | options | A value that specifies whether the new render target must be compatible with GDI. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateCompatibleRenderTarget(D2D1SizeU, D2D1PixelFormat, D2D1CompatibleRenderTargetOptions)
Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target.
Declaration
public D2D1BitmapRenderTarget CreateCompatibleRenderTarget(D2D1SizeU desiredPixelSize, D2D1PixelFormat desiredFormat, D2D1CompatibleRenderTargetOptions options)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeU | desiredPixelSize | The desired size of the new render target in pixels if it should be different from the original render target. |
D2D1PixelFormat | desiredFormat | The desired pixel format and alpha mode of the new render target. |
D2D1CompatibleRenderTargetOptions | options | A value that specifies whether the new render target must be compatible with GDI. |
Returns
Type | Description |
---|---|
D2D1BitmapRenderTarget | The new bitmap render target. |
CreateGradientStopCollection(D2D1GradientStop[])
Creates an D2D1GradientStopCollection from the specified gradient stops, color interpolation gamma, and extend mode.
Declaration
public D2D1GradientStopCollection CreateGradientStopCollection(D2D1GradientStop[] gradientStops)
Parameters
Type | Name | Description |
---|---|---|
D2D1GradientStop[] | gradientStops | An array of D2D1GradientStop structures. |
Returns
Type | Description |
---|---|
D2D1GradientStopCollection | The new gradient stop collection. |
CreateGradientStopCollection(D2D1GradientStop[], D2D1Gamma, D2D1ExtendMode)
Creates an D2D1GradientStopCollection from the specified gradient stops, color interpolation gamma, and extend mode.
Declaration
public D2D1GradientStopCollection CreateGradientStopCollection(D2D1GradientStop[] gradientStops, D2D1Gamma colorInterpolationGamma, D2D1ExtendMode extendMode)
Parameters
Type | Name | Description |
---|---|---|
D2D1GradientStop[] | gradientStops | An array of D2D1GradientStop structures. |
D2D1Gamma | colorInterpolationGamma | The space in which color interpolation between the gradient stops is performed. |
D2D1ExtendMode | extendMode | The behavior of the gradient outside the [0,1] normalized range. |
Returns
Type | Description |
---|---|
D2D1GradientStopCollection | The new gradient stop collection. |
CreateLayer()
Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size.
Declaration
public D2D1Layer CreateLayer()
Returns
Type | Description |
---|---|
D2D1Layer | The new layer. |
CreateLayer(D2D1SizeF)
Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size.
Declaration
public D2D1Layer CreateLayer(D2D1SizeF size)
Parameters
Type | Name | Description |
---|---|---|
D2D1SizeF | size | The initial size of the layer in device-independent pixels. |
Returns
Type | Description |
---|---|
D2D1Layer | The new layer. |
CreateLinearGradientBrush(D2D1LinearGradientBrushProperties, D2D1BrushProperties, D2D1GradientStopCollection)
Creates an D2D1LinearGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.
Declaration
public D2D1LinearGradientBrush CreateLinearGradientBrush(D2D1LinearGradientBrushProperties linearGradientBrushProperties, D2D1BrushProperties brushProperties, D2D1GradientStopCollection gradientStopCollection)
Parameters
Type | Name | Description |
---|---|---|
D2D1LinearGradientBrushProperties | linearGradientBrushProperties | The start and end points of the gradient. |
D2D1BrushProperties | brushProperties | The transform and base opacity of the new brush. |
D2D1GradientStopCollection | gradientStopCollection | A collection of D2D1GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient line. |
Returns
Type | Description |
---|---|
D2D1LinearGradientBrush | The new brush. |
CreateLinearGradientBrush(D2D1LinearGradientBrushProperties, D2D1GradientStopCollection)
Creates an D2D1LinearGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.
Declaration
public D2D1LinearGradientBrush CreateLinearGradientBrush(D2D1LinearGradientBrushProperties linearGradientBrushProperties, D2D1GradientStopCollection gradientStopCollection)
Parameters
Type | Name | Description |
---|---|---|
D2D1LinearGradientBrushProperties | linearGradientBrushProperties | The start and end points of the gradient. |
D2D1GradientStopCollection | gradientStopCollection | A collection of D2D1GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient line. |
Returns
Type | Description |
---|---|
D2D1LinearGradientBrush | The new brush. |
CreateMesh()
Create a mesh that uses triangles to describe a shape.
Declaration
public D2D1Mesh CreateMesh()
Returns
Type | Description |
---|---|
D2D1Mesh | The new mesh. |
CreateRadialGradientBrush(D2D1RadialGradientBrushProperties, D2D1BrushProperties, D2D1GradientStopCollection)
Creates an D2D1RadialGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.
Declaration
public D2D1RadialGradientBrush CreateRadialGradientBrush(D2D1RadialGradientBrushProperties radialGradientBrushProperties, D2D1BrushProperties brushProperties, D2D1GradientStopCollection gradientStopCollection)
Parameters
Type | Name | Description |
---|---|---|
D2D1RadialGradientBrushProperties | radialGradientBrushProperties | The center, gradient origin offset, and x-radius and y-radius of the brush's gradient. |
D2D1BrushProperties | brushProperties | The transform and base opacity of the new brush. |
D2D1GradientStopCollection | gradientStopCollection | A collection of D2D1GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient. |
Returns
Type | Description |
---|---|
D2D1RadialGradientBrush | The new brush. |
CreateRadialGradientBrush(D2D1RadialGradientBrushProperties, D2D1GradientStopCollection)
Creates an D2D1RadialGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.
Declaration
public D2D1RadialGradientBrush CreateRadialGradientBrush(D2D1RadialGradientBrushProperties radialGradientBrushProperties, D2D1GradientStopCollection gradientStopCollection)
Parameters
Type | Name | Description |
---|---|---|
D2D1RadialGradientBrushProperties | radialGradientBrushProperties | The center, gradient origin offset, and x-radius and y-radius of the brush's gradient. |
D2D1GradientStopCollection | gradientStopCollection | A collection of D2D1GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient. |
Returns
Type | Description |
---|---|
D2D1RadialGradientBrush | The new brush. |
CreateSharedBitmap(Guid, object)
Creates an D2D1Bitmap whose data is shared with another resource.
Declaration
public D2D1Bitmap CreateSharedBitmap(Guid riid, object data)
Parameters
Type | Name | Description |
---|---|---|
Guid | riid | The interface ID of the object supplying the source data. |
object | data | The data to share. |
Returns
Type | Description |
---|---|
D2D1Bitmap | The new bitmap. |
CreateSharedBitmap(Guid, object, D2D1BitmapProperties)
Creates an D2D1Bitmap whose data is shared with another resource.
Declaration
public D2D1Bitmap CreateSharedBitmap(Guid riid, object data, D2D1BitmapProperties bitmapProperties)
Parameters
Type | Name | Description |
---|---|---|
Guid | riid | The interface ID of the object supplying the source data. |
object | data | The data to share. |
D2D1BitmapProperties | bitmapProperties | The pixel format and DPI of the bitmap to create. |
Returns
Type | Description |
---|---|
D2D1Bitmap | The new bitmap. |
CreateSolidColorBrush(D2D1ColorF)
Creates a new D2D1SolidColorBrush that has the specified color and opacity.
Declaration
public D2D1SolidColorBrush CreateSolidColorBrush(D2D1ColorF color)
Parameters
Type | Name | Description |
---|---|---|
D2D1ColorF | color | The red, green, blue, and alpha values of the brush's color. |
Returns
Type | Description |
---|---|
D2D1SolidColorBrush | The new brush. |
CreateSolidColorBrush(D2D1ColorF, D2D1BrushProperties)
Creates a new D2D1SolidColorBrush that has the specified color and opacity.
Declaration
public D2D1SolidColorBrush CreateSolidColorBrush(D2D1ColorF color, D2D1BrushProperties brushProperties)
Parameters
Type | Name | Description |
---|---|---|
D2D1ColorF | color | The red, green, blue, and alpha values of the brush's color. |
D2D1BrushProperties | brushProperties | The base opacity of the brush. |
Returns
Type | Description |
---|---|
D2D1SolidColorBrush | The new brush. |
DrawBitmap(D2D1Bitmap)
Draws the specified bitmap after scaling it to the size of the specified rectangle.
Declaration
public void DrawBitmap(D2D1Bitmap bitmap)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | bitmap | The bitmap to render. |
DrawBitmap(D2D1Bitmap, D2D1RectF)
Draws the specified bitmap after scaling it to the size of the specified rectangle.
Declaration
public void DrawBitmap(D2D1Bitmap bitmap, D2D1RectF destinationRectangle)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | bitmap | The bitmap to render. |
D2D1RectF | destinationRectangle | The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn. |
DrawBitmap(D2D1Bitmap, D2D1RectF, float)
Draws the specified bitmap after scaling it to the size of the specified rectangle.
Declaration
public void DrawBitmap(D2D1Bitmap bitmap, D2D1RectF destinationRectangle, float opacity)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | bitmap | The bitmap to render. |
D2D1RectF | destinationRectangle | The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn. |
float | opacity | A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents. |
DrawBitmap(D2D1Bitmap, D2D1RectF, float, D2D1BitmapInterpolationMode)
Draws the specified bitmap after scaling it to the size of the specified rectangle.
Declaration
public void DrawBitmap(D2D1Bitmap bitmap, D2D1RectF destinationRectangle, float opacity, D2D1BitmapInterpolationMode interpolationMode)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | bitmap | The bitmap to render. |
D2D1RectF | destinationRectangle | The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn. |
float | opacity | A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents. |
D2D1BitmapInterpolationMode | interpolationMode | The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation. |
DrawBitmap(D2D1Bitmap, D2D1RectF, float, D2D1BitmapInterpolationMode, D2D1RectF)
Draws the specified bitmap after scaling it to the size of the specified rectangle.
Declaration
public void DrawBitmap(D2D1Bitmap bitmap, D2D1RectF destinationRectangle, float opacity, D2D1BitmapInterpolationMode interpolationMode, D2D1RectF sourceRectangle)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | bitmap | The bitmap to render. |
D2D1RectF | destinationRectangle | The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn. |
float | opacity | A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents. |
D2D1BitmapInterpolationMode | interpolationMode | The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation. |
D2D1RectF | sourceRectangle | The size and position, in device-independent pixels in the bitmap's coordinate space, of the area within the bitmap to be drawn. |
DrawEllipse(D2D1Ellipse, D2D1Brush)
Draws the outline of the specified ellipse using the specified stroke style.
Declaration
public void DrawEllipse(D2D1Ellipse ellipse, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1Ellipse | ellipse | The position and radius of the ellipse to draw, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the ellipse's outline. |
DrawEllipse(D2D1Ellipse, D2D1Brush, float)
Draws the outline of the specified ellipse using the specified stroke style.
Declaration
public void DrawEllipse(D2D1Ellipse ellipse, D2D1Brush brush, float strokeWidth)
Parameters
Type | Name | Description |
---|---|---|
D2D1Ellipse | ellipse | The position and radius of the ellipse to draw, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the ellipse's outline. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
DrawEllipse(D2D1Ellipse, D2D1Brush, float, D2D1StrokeStyle)
Draws the outline of the specified ellipse using the specified stroke style.
Declaration
public void DrawEllipse(D2D1Ellipse ellipse, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
Parameters
Type | Name | Description |
---|---|---|
D2D1Ellipse | ellipse | The position and radius of the ellipse to draw, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the ellipse's outline. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
D2D1StrokeStyle | strokeStyle | The style of stroke to apply to the ellipse's outline. |
DrawGeometry(D2D1Geometry, D2D1Brush)
Draws the outline of the specified geometry using the specified stroke style.
Declaration
public void DrawGeometry(D2D1Geometry geometry, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1Geometry | geometry | The geometry to draw. |
D2D1Brush | brush | The brush used to paint the geometry's stroke. |
DrawGeometry(D2D1Geometry, D2D1Brush, float)
Draws the outline of the specified geometry using the specified stroke style.
Declaration
public void DrawGeometry(D2D1Geometry geometry, D2D1Brush brush, float strokeWidth)
Parameters
Type | Name | Description |
---|---|---|
D2D1Geometry | geometry | The geometry to draw. |
D2D1Brush | brush | The brush used to paint the geometry's stroke. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
DrawGeometry(D2D1Geometry, D2D1Brush, float, D2D1StrokeStyle)
Draws the outline of the specified geometry using the specified stroke style.
Declaration
public void DrawGeometry(D2D1Geometry geometry, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
Parameters
Type | Name | Description |
---|---|---|
D2D1Geometry | geometry | The geometry to draw. |
D2D1Brush | brush | The brush used to paint the geometry's stroke. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
D2D1StrokeStyle | strokeStyle | The style of stroke to apply to the geometry's outline. |
DrawGlyphRun(D2D1Point2F, DWriteGlyphRun, D2D1Brush)
Draws the specified glyphs.
Declaration
public void DrawGlyphRun(D2D1Point2F baselineOrigin, DWriteGlyphRun glyphRun, D2D1Brush foregroundBrush)
Parameters
Type | Name | Description |
---|---|---|
D2D1Point2F | baselineOrigin | The origin, in device-independent pixels, of the glyphs' baseline. |
DWriteGlyphRun | glyphRun | The glyphs to render. |
D2D1Brush | foregroundBrush | The brush used to paint the specified glyphs. |
DrawGlyphRun(D2D1Point2F, DWriteGlyphRun, D2D1Brush, DWriteMeasuringMode)
Draws the specified glyphs.
Declaration
public void DrawGlyphRun(D2D1Point2F baselineOrigin, DWriteGlyphRun glyphRun, D2D1Brush foregroundBrush, DWriteMeasuringMode measuringMode)
Parameters
Type | Name | Description |
---|---|---|
D2D1Point2F | baselineOrigin | The origin, in device-independent pixels, of the glyphs' baseline. |
DWriteGlyphRun | glyphRun | The glyphs to render. |
D2D1Brush | foregroundBrush | The brush used to paint the specified glyphs. |
DWriteMeasuringMode | measuringMode | A value that indicates how glyph metrics are used to measure text when it is formatted. |
DrawLine(D2D1Point2F, D2D1Point2F, D2D1Brush)
Draws a line between the specified points using the specified stroke style.
Declaration
public void DrawLine(D2D1Point2F point0, D2D1Point2F point1, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1Point2F | point0 | The start point of the line, in device-independent pixels. |
D2D1Point2F | point1 | The end point of the line, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the line's stroke. |
DrawLine(D2D1Point2F, D2D1Point2F, D2D1Brush, float)
Draws a line between the specified points using the specified stroke style.
Declaration
public void DrawLine(D2D1Point2F point0, D2D1Point2F point1, D2D1Brush brush, float strokeWidth)
Parameters
Type | Name | Description |
---|---|---|
D2D1Point2F | point0 | The start point of the line, in device-independent pixels. |
D2D1Point2F | point1 | The end point of the line, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the line's stroke. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
DrawLine(D2D1Point2F, D2D1Point2F, D2D1Brush, float, D2D1StrokeStyle)
Draws a line between the specified points using the specified stroke style.
Declaration
public void DrawLine(D2D1Point2F point0, D2D1Point2F point1, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
Parameters
Type | Name | Description |
---|---|---|
D2D1Point2F | point0 | The start point of the line, in device-independent pixels. |
D2D1Point2F | point1 | The end point of the line, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the line's stroke. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
D2D1StrokeStyle | strokeStyle | The style of stroke to paint. |
DrawRectangle(D2D1RectF, D2D1Brush)
Draws the outline of a rectangle that has the specified dimensions and stroke style.
Declaration
public void DrawRectangle(D2D1RectF rect, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1RectF | rect | The dimensions of the rectangle to draw, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the rectangle's stroke. |
DrawRectangle(D2D1RectF, D2D1Brush, float)
Draws the outline of a rectangle that has the specified dimensions and stroke style.
Declaration
public void DrawRectangle(D2D1RectF rect, D2D1Brush brush, float strokeWidth)
Parameters
Type | Name | Description |
---|---|---|
D2D1RectF | rect | The dimensions of the rectangle to draw, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the rectangle's stroke. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
DrawRectangle(D2D1RectF, D2D1Brush, float, D2D1StrokeStyle)
Draws the outline of a rectangle that has the specified dimensions and stroke style.
Declaration
public void DrawRectangle(D2D1RectF rect, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
Parameters
Type | Name | Description |
---|---|---|
D2D1RectF | rect | The dimensions of the rectangle to draw, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the rectangle's stroke. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
D2D1StrokeStyle | strokeStyle | The style of stroke to paint. |
DrawRoundedRectangle(D2D1RoundedRect, D2D1Brush)
Draws the outline of the specified rounded rectangle using the specified stroke style.
Declaration
public void DrawRoundedRectangle(D2D1RoundedRect roundedRect, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1RoundedRect | roundedRect | The dimensions of the rounded rectangle to draw, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the rounded rectangle's outline. |
DrawRoundedRectangle(D2D1RoundedRect, D2D1Brush, float)
Draws the outline of the specified rounded rectangle using the specified stroke style.
Declaration
public void DrawRoundedRectangle(D2D1RoundedRect roundedRect, D2D1Brush brush, float strokeWidth)
Parameters
Type | Name | Description |
---|---|---|
D2D1RoundedRect | roundedRect | The dimensions of the rounded rectangle to draw, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the rounded rectangle's outline. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
DrawRoundedRectangle(D2D1RoundedRect, D2D1Brush, float, D2D1StrokeStyle)
Draws the outline of the specified rounded rectangle using the specified stroke style.
Declaration
public void DrawRoundedRectangle(D2D1RoundedRect roundedRect, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
Parameters
Type | Name | Description |
---|---|---|
D2D1RoundedRect | roundedRect | The dimensions of the rounded rectangle to draw, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the rounded rectangle's outline. |
float | strokeWidth | The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line. |
D2D1StrokeStyle | strokeStyle | The style of the rounded rectangle's stroke. |
DrawText(string, DWriteTextFormat, D2D1RectF, D2D1Brush)
Draws the specified text using the format information provided by an DWriteTextFormat object.
Declaration
public void DrawText(string text, DWriteTextFormat textFormat, D2D1RectF layoutRect, D2D1Brush defaultForegroundBrush)
Parameters
Type | Name | Description |
---|---|---|
string | text | An array of Unicode characters to draw. |
DWriteTextFormat | textFormat | An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction. |
D2D1RectF | layoutRect | The size and position of the area in which the text is drawn. |
D2D1Brush | defaultForegroundBrush | The brush used to paint the text. |
DrawText(string, DWriteTextFormat, D2D1RectF, D2D1Brush, D2D1DrawTextOptions)
Draws the specified text using the format information provided by an DWriteTextFormat object.
Declaration
public void DrawText(string text, DWriteTextFormat textFormat, D2D1RectF layoutRect, D2D1Brush defaultForegroundBrush, D2D1DrawTextOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | text | An array of Unicode characters to draw. |
DWriteTextFormat | textFormat | An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction. |
D2D1RectF | layoutRect | The size and position of the area in which the text is drawn. |
D2D1Brush | defaultForegroundBrush | The brush used to paint the text. |
D2D1DrawTextOptions | options | A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. |
DrawText(string, DWriteTextFormat, D2D1RectF, D2D1Brush, D2D1DrawTextOptions, DWriteMeasuringMode)
Draws the specified text using the format information provided by an DWriteTextFormat object.
Declaration
public void DrawText(string text, DWriteTextFormat textFormat, D2D1RectF layoutRect, D2D1Brush defaultForegroundBrush, D2D1DrawTextOptions options, DWriteMeasuringMode measuringMode)
Parameters
Type | Name | Description |
---|---|---|
string | text | An array of Unicode characters to draw. |
DWriteTextFormat | textFormat | An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction. |
D2D1RectF | layoutRect | The size and position of the area in which the text is drawn. |
D2D1Brush | defaultForegroundBrush | The brush used to paint the text. |
D2D1DrawTextOptions | options | A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. |
DWriteMeasuringMode | measuringMode | A value that indicates how glyph metrics are used to measure text when it is formatted. |
DrawTextLayout(D2D1Point2F, DWriteTextLayout, D2D1Brush)
Draws the formatted text described by the specified DWriteTextLayout object.
Declaration
public void DrawTextLayout(D2D1Point2F origin, DWriteTextLayout textLayout, D2D1Brush defaultForegroundBrush)
Parameters
Type | Name | Description |
---|---|---|
D2D1Point2F | origin | The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn. |
DWriteTextLayout | textLayout | The formatted text to draw. |
D2D1Brush | defaultForegroundBrush | The brush used to paint any text in textLayout that does not already have a brush associated with it as a drawing effect. |
DrawTextLayout(D2D1Point2F, DWriteTextLayout, D2D1Brush, D2D1DrawTextOptions)
Draws the formatted text described by the specified DWriteTextLayout object.
Declaration
public void DrawTextLayout(D2D1Point2F origin, DWriteTextLayout textLayout, D2D1Brush defaultForegroundBrush, D2D1DrawTextOptions options)
Parameters
Type | Name | Description |
---|---|---|
D2D1Point2F | origin | The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn. |
DWriteTextLayout | textLayout | The formatted text to draw. |
D2D1Brush | defaultForegroundBrush | The brush used to paint any text in textLayout that does not already have a brush associated with it as a drawing effect. |
D2D1DrawTextOptions | options | A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. |
EndDraw()
Ends drawing operations on the render target and indicates the current error state and associated tags.
Declaration
public void EndDraw()
EndDraw(out ulong, out ulong)
Ends drawing operations on the render target and indicates the current error state and associated tags.
Declaration
public void EndDraw(out ulong tag1, out ulong tag2)
Parameters
Type | Name | Description |
---|---|---|
ulong | tag1 | The first tag for drawing operations that caused errors or 0 if there were no errors. |
ulong | tag2 | The second tag for drawing operations that caused errors or 0 if there were no errors. |
EndDrawIgnoringRecreateTargetError()
Ends drawing operations on the render target, ignoring the recreate target error.
Declaration
public void EndDrawIgnoringRecreateTargetError()
FillEllipse(D2D1Ellipse, D2D1Brush)
Paints the interior of the specified ellipse.
Declaration
public void FillEllipse(D2D1Ellipse ellipse, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1Ellipse | ellipse | The position and radius, in device-independent pixels, of the ellipse to paint. |
D2D1Brush | brush | The brush used to paint the interior of the ellipse. |
FillGeometry(D2D1Geometry, D2D1Brush)
Paints the interior of the specified geometry.
Declaration
public void FillGeometry(D2D1Geometry geometry, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1Geometry | geometry | The geometry to paint. |
D2D1Brush | brush | The brush used to paint the geometry's interior. |
FillGeometry(D2D1Geometry, D2D1Brush, D2D1Brush)
Paints the interior of the specified geometry.
Declaration
public void FillGeometry(D2D1Geometry geometry, D2D1Brush brush, D2D1Brush opacityBrush)
Parameters
Type | Name | Description |
---|---|---|
D2D1Geometry | geometry | The geometry to paint. |
D2D1Brush | brush | The brush used to paint the geometry's interior. |
D2D1Brush | opacityBrush | The opacity mask to apply to the geometry. |
FillMesh(D2D1Mesh, D2D1Brush)
Paints the interior of the specified mesh.
Declaration
public void FillMesh(D2D1Mesh mesh, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1Mesh | mesh | The mesh to paint. |
D2D1Brush | brush | The brush used to paint the mesh. |
FillOpacityMask(D2D1Bitmap, D2D1Brush, D2D1OpacityMaskContent)
Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target.
Declaration
public void FillOpacityMask(D2D1Bitmap opacityMask, D2D1Brush brush, D2D1OpacityMaskContent content)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | opacityMask | The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle. |
D2D1Brush | brush | The brush used to paint the region of the render target specified by destinationRectangle. |
D2D1OpacityMaskContent | content | The type of content the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended. |
FillOpacityMask(D2D1Bitmap, D2D1Brush, D2D1OpacityMaskContent, D2D1RectF)
Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target.
Declaration
public void FillOpacityMask(D2D1Bitmap opacityMask, D2D1Brush brush, D2D1OpacityMaskContent content, D2D1RectF destinationRectangle)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | opacityMask | The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle. |
D2D1Brush | brush | The brush used to paint the region of the render target specified by destinationRectangle. |
D2D1OpacityMaskContent | content | The type of content the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended. |
D2D1RectF | destinationRectangle | The region of the render target to paint, in device-independent pixels. |
FillOpacityMask(D2D1Bitmap, D2D1Brush, D2D1OpacityMaskContent, D2D1RectF, D2D1RectF)
Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target.
Declaration
public void FillOpacityMask(D2D1Bitmap opacityMask, D2D1Brush brush, D2D1OpacityMaskContent content, D2D1RectF destinationRectangle, D2D1RectF sourceRectangle)
Parameters
Type | Name | Description |
---|---|---|
D2D1Bitmap | opacityMask | The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle. |
D2D1Brush | brush | The brush used to paint the region of the render target specified by destinationRectangle. |
D2D1OpacityMaskContent | content | The type of content the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended. |
D2D1RectF | destinationRectangle | The region of the render target to paint, in device-independent pixels. |
D2D1RectF | sourceRectangle | The region of the bitmap to use as the opacity mask, in device-independent pixels. |
FillRectangle(D2D1RectF, D2D1Brush)
Paints the interior of the specified rectangle.
Declaration
public void FillRectangle(D2D1RectF rect, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1RectF | rect | The dimension of the rectangle to paint, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the rectangle's interior. |
FillRoundedRectangle(D2D1RoundedRect, D2D1Brush)
Paints the interior of the specified rounded rectangle.
Declaration
public void FillRoundedRectangle(D2D1RoundedRect roundedRect, D2D1Brush brush)
Parameters
Type | Name | Description |
---|---|---|
D2D1RoundedRect | roundedRect | The dimensions of the rounded rectangle to paint, in device-independent pixels. |
D2D1Brush | brush | The brush used to paint the interior of the rounded rectangle. |
Flush()
Executes all pending drawing commands.
Declaration
public void Flush()
Flush(out ulong, out ulong)
Executes all pending drawing commands.
Declaration
public void Flush(out ulong tag1, out ulong tag2)
Parameters
Type | Name | Description |
---|---|---|
ulong | tag1 | The first tag for drawing operations that caused errors or 0 if there were no errors. |
ulong | tag2 | The second tag for drawing operations that caused errors or 0 if there were no errors. |
GetDpi(out float, out float)
Return the render target's dots per inch (DPI).
Declaration
public void GetDpi(out float dpiX, out float dpiY)
Parameters
Type | Name | Description |
---|---|---|
float | dpiX | The horizontal DPI of the render target. |
float | dpiY | The vertical DPI of the render target. |
GetTags(out ulong, out ulong)
Gets the label for subsequent drawing operations.
Declaration
public void GetTags(out ulong tag1, out ulong tag2)
Parameters
Type | Name | Description |
---|---|---|
ulong | tag1 | The first label for subsequent drawing operations. |
ulong | tag2 | The second label for subsequent drawing operations. |
GetTextRenderingParams()
Retrieves the render target's current text rendering options.
Declaration
public DWriteRenderingParams GetTextRenderingParams()
Returns
Type | Description |
---|---|
DWriteRenderingParams | The render target's current text rendering options. |
IsSupported(D2D1RenderTargetProperties)
Indicates whether the render target supports the specified properties.
Declaration
public bool IsSupported(D2D1RenderTargetProperties renderTargetProperties)
Parameters
Type | Name | Description |
---|---|---|
D2D1RenderTargetProperties | renderTargetProperties | The render target properties to test. |
Returns
Type | Description |
---|---|
bool |
PopAxisAlignedClip()
Removes the last axis-aligned clip from the render target. After this method is called, the clip is no longer applied to subsequent drawing operations.
Declaration
public void PopAxisAlignedClip()
PopLayer()
Stops redirecting drawing operations to the layer that is specified by the last PushLayer(D2D1LayerParameters, D2D1Layer) call.
Declaration
public void PopLayer()
PushAxisAlignedClip(D2D1RectF, D2D1AntialiasMode)
Specifies a rectangle to which all subsequent drawing operations are clipped.
Declaration
public void PushAxisAlignedClip(D2D1RectF clipRect, D2D1AntialiasMode antialiasMode)
Parameters
Type | Name | Description |
---|---|---|
D2D1RectF | clipRect | The size and position of the clipping area, in device-independent pixels. |
D2D1AntialiasMode | antialiasMode | The antialiasing mode that is used to draw the edges of clip rectangles that have subpixel boundaries, and to blend the clip with the scene contents. The blending is performed once when the PopAxisAlignedClip() method is called, and does not apply to each primitive within the layer. |
PushLayer(D2D1LayerParameters, D2D1Layer)
Adds the specified layer to the render target so that it receives all subsequent drawing operations until PopLayer() is called.
Declaration
public void PushLayer(D2D1LayerParameters layerParameters, D2D1Layer layer)
Parameters
Type | Name | Description |
---|---|---|
D2D1LayerParameters | layerParameters | The content bounds, geometric mask, opacity, opacity mask, and antialiasing options for the layer. |
D2D1Layer | layer | The layer that receives subsequent drawing operations. |
RestoreDrawingState(D2D1DrawingStateBlock)
Sets the render target's drawing state to that of the specified D2D1DrawingStateBlock.
Declaration
public void RestoreDrawingState(D2D1DrawingStateBlock drawingStateBlock)
Parameters
Type | Name | Description |
---|---|---|
D2D1DrawingStateBlock | drawingStateBlock | The new drawing state of the render target. |
SaveDrawingState(D2D1DrawingStateBlock)
Saves the current drawing state to the specified D2D1DrawingStateBlock.
Declaration
public void SaveDrawingState(D2D1DrawingStateBlock drawingStateBlock)
Parameters
Type | Name | Description |
---|---|---|
D2D1DrawingStateBlock | drawingStateBlock | The current drawing state of the render target. |
SetDpi(float, float)
Sets the dots per inch (DPI) of the render target.
Declaration
public void SetDpi(float dpiX, float dpiY)
Parameters
Type | Name | Description |
---|---|---|
float | dpiX | A value greater than or equal to zero that specifies the horizontal DPI of the render target. |
float | dpiY | A value greater than or equal to zero that specifies the vertical DPI of the render target. |
SetTags(ulong, ulong)
Specifies a label for subsequent drawing operations.
Declaration
public void SetTags(ulong tag1, ulong tag2)
Parameters
Type | Name | Description |
---|---|---|
ulong | tag1 | The first to apply to subsequent drawing operations. |
ulong | tag2 | The second to apply to subsequent drawing operations. |
SetTextRenderingParams()
Specifies text rendering options to be applied to all subsequent text and glyph drawing operations.
Declaration
public void SetTextRenderingParams()
SetTextRenderingParams(DWriteRenderingParams)
Specifies text rendering options to be applied to all subsequent text and glyph drawing operations.
Declaration
public void SetTextRenderingParams(DWriteRenderingParams textRenderingParams)
Parameters
Type | Name | Description |
---|---|---|
DWriteRenderingParams | textRenderingParams | The text rendering options to be applied to all subsequent text and glyph drawing operations. |