ID2D1RenderTarget interface (d2d1.h)

Represents an object that can receive drawing commands. Interfaces that inherit from ID2D1RenderTarget render the drawing commands they receive in different ways.

Inheritance

The ID2D1RenderTarget interface inherits from ID2D1Resource. ID2D1RenderTarget also has these types of members:

Methods

The ID2D1RenderTarget interface has these methods.

 
ID2D1RenderTarget::BeginDraw

Initiates drawing on this render target.
ID2D1RenderTarget::Clear

Clears the drawing area to the specified color. (overload 2/3)
ID2D1RenderTarget::Clear

Clears the drawing area to the specified color. (overload 1/3)
ID2D1RenderTarget::CreateBitmap

Creates an uninitialized Direct2D bitmap.
ID2D1RenderTarget::CreateBitmap

Creates a Direct2D bitmap from a pointer to in-memory source data.
ID2D1RenderTarget::CreateBitmap

Creates an ID2D1BitmapBrush from the specified bitmap. (overload 2/3)
ID2D1RenderTarget::CreateBitmapBrush

Creates an ID2D1BitmapBrush from the specified bitmap. (overload 1/3)
ID2D1RenderTarget::CreateBitmapBrush

Creates an ID2D1BitmapBrush from the specified bitmap. The brush uses the default values for its opacity and transform.
ID2D1RenderTarget::CreateBitmapBrush

Creates an ID2D1BitmapBrush from the specified bitmap. (overload 3/3)
ID2D1RenderTarget::CreateBitmapBrush

Creates an ID2D1BitmapBrush from the specified bitmap. The brush uses the default values for its extend mode, interpolation mode, opacity, and transform.
ID2D1RenderTarget::CreateBitmapFromWicBitmap

Creates an ID2D1Bitmap by copying the specified Microsoft Windows Imaging Component (WIC) bitmap. (overload 2/4)
ID2D1RenderTarget::CreateBitmapFromWicBitmap

Creates an ID2D1Bitmap by copying the specified Microsoft Windows Imaging Component (WIC) bitmap. (overload 4/4)
ID2D1RenderTarget::CreateBitmapFromWicBitmap

Creates an ID2D1Bitmap by copying the specified Microsoft Windows Imaging Component (WIC) bitmap. (overload 3/4)
ID2D1RenderTarget::CreateCompatibleRenderTarget

Creates a new bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target .
ID2D1RenderTarget::CreateCompatibleRenderTarget

Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target. (overload 2/2)
ID2D1RenderTarget::CreateCompatibleRenderTarget

Creates a bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target. (overload 1/2)
ID2D1RenderTarget::CreateCompatibleRenderTarget

Creates a bitmap render target for use during intermediate off-screen drawing that is compatible with the current render target. The new bitmap render target has the same pixel format (but not alpha mode) as the current render target.
ID2D1RenderTarget::CreateCompatibleRenderTarget

Creates a new bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target and has the same pixel format (but not alpha mode) as the current render target.
ID2D1RenderTarget::CreateCompatibleRenderTarget

Creates a new bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target and has the same size, DPI, and pixel format (but not alpha mode) as the current render target.
ID2D1RenderTarget::CreateGradientStopCollection

Creates an ID2D1GradientStopCollection from the specified array of D2D1_GRADIENT_STOP structures.
ID2D1RenderTarget::CreateGradientStopCollection

Creates an ID2D1GradientStopCollection from the specified gradient stops that uses the D2D1_GAMMA_2_2 color interpolation gamma and the clamp extend mode.
ID2D1RenderTarget::CreateLayer

Creates a layer resource that can be used with this render target and its compatible render targets. (overload 2/2)
ID2D1RenderTarget::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.
ID2D1RenderTarget::CreateLayer

Creates a layer resource that can be used with this render target and its compatible render targets. (overload 1/2)
ID2D1RenderTarget::CreateLinearGradientBrush

Creates an ID2D1LinearGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.
ID2D1RenderTarget::CreateLinearGradientBrush

Creates an ID2D1LinearGradientBrush that contains the specified gradient stops, has no transform, and has a base opacity of 1.0.
ID2D1RenderTarget::CreateLinearGradientBrush

Creates an ID2D1LinearGradientBrush object for painting areas with a linear gradient.
ID2D1RenderTarget::CreateMesh

Create a mesh that uses triangles to describe a shape.
ID2D1RenderTarget::CreateRadialGradientBrush

Creates an ID2D1RadialGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.
ID2D1RenderTarget::CreateRadialGradientBrush

Creates an ID2D1RadialGradientBrush that contains the specified gradient stops, has no transform, and has a base opacity of 1.0.
ID2D1RenderTarget::CreateRadialGradientBrush

Creates an ID2D1RadialGradientBrush object that can be used to paint areas with a radial gradient.
ID2D1RenderTarget::CreateSharedBitmap

Creates an ID2D1Bitmap whose data is shared with another resource.
ID2D1RenderTarget::CreateSolidColorBrush

Creates a new ID2D1SolidColorBrush that has the specified color and opacity.
ID2D1RenderTarget::CreateSolidColorBrush

Creates a new ID2D1SolidColorBrush that has the specified color and a base opacity of 1.0f.
ID2D1RenderTarget::CreateSolidColorBrush

Creates a new ID2D1SolidColorBrush that can be used to paint areas with a solid color.
ID2D1RenderTarget::DrawBitmap

Draws the specified bitmap after scaling it to the size of the specified rectangle. (overload 1/3)
ID2D1RenderTarget::DrawBitmap

Draws the specified bitmap after scaling it to the size of the specified rectangle. (overload 2/3)
ID2D1RenderTarget::DrawBitmap

Draws the specified bitmap after scaling it to the size of the specified rectangle. (overload 3/3)
ID2D1RenderTarget::DrawEllipse

Draws the outline of the specified ellipse using the specified stroke style.
ID2D1RenderTarget::DrawEllipse

Draws the outline of an ellipse with the specified dimensions and stroke.
ID2D1RenderTarget::DrawGeometry

Draws the outline of the specified geometry using the specified stroke style.
ID2D1RenderTarget::DrawGlyphRun

Draws the specified glyphs.
ID2D1RenderTarget::DrawLine

Draws a line between the specified points using the specified stroke style.
ID2D1RenderTarget::DrawRectangle

Draws the outline of a rectangle that has the specified dimensions and stroke style. (overload 2/2)
ID2D1RenderTarget::DrawRectangle

Draws the outline of a rectangle that has the specified dimensions and stroke style. (overload 1/2)
ID2D1RenderTarget::DrawRoundedRectangle

Draws the outline of the specified rounded rectangle using the specified stroke style. (overload 1/2)
ID2D1RenderTarget::DrawRoundedRectangle

Draws the outline of the specified rounded rectangle using the specified stroke style. (overload 2/2)
ID2D1RenderTarget::DrawText

Draws the specified text using the format information provided by an IDWriteTextFormat object. (overload 1/2)
ID2D1RenderTarget::DrawText

Draws the specified text using the format information provided by an IDWriteTextFormat object. (overload 2/2)
ID2D1RenderTarget::DrawTextLayout

Draws the formatted text described by the specified IDWriteTextLayout object.
ID2D1RenderTarget::EndDraw

Ends drawing operations on the render target and indicates the current error state and associated tags.
ID2D1RenderTarget::FillEllipse

Paints the interior of the specified ellipse. (overload 1/2)
ID2D1RenderTarget::FillEllipse

Paints the interior of the specified ellipse. (overload 2/2)
ID2D1RenderTarget::FillGeometry

Paints the interior of the specified geometry.
ID2D1RenderTarget::FillMesh

Paints the interior of the specified mesh.
ID2D1RenderTarget::FillOpacityMask

Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target. (overload 1/2)
ID2D1RenderTarget::FillOpacityMask

Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target. (overload 2/2)
ID2D1RenderTarget::FillRectangle

Paints the interior of the specified rectangle. (overload 1/2)
ID2D1RenderTarget::FillRectangle

Paints the interior of the specified rectangle. (overload 2/2)
ID2D1RenderTarget::FillRoundedRectangle

Paints the interior of the specified rounded rectangle. (overload 1/2)
ID2D1RenderTarget::FillRoundedRectangle

Paints the interior of the specified rounded rectangle. (overload 2/2)
ID2D1RenderTarget::Flush

Executes all pending drawing commands.
ID2D1RenderTarget::GetAntialiasMode

Retrieves the current antialiasing mode for nontext drawing operations.
ID2D1RenderTarget::GetDpi

Return the render target's dots per inch (DPI).
ID2D1RenderTarget::GetMaximumBitmapSize

Gets the maximum size, in device-dependent units (pixels), of any one bitmap dimension supported by the render target.
ID2D1RenderTarget::GetPixelFormat

Retrieves the pixel format and alpha mode of the render target.
ID2D1RenderTarget::GetPixelSize

Returns the size of the render target in device pixels.
ID2D1RenderTarget::GetSize

Returns the size of the render target in device-independent pixels.
ID2D1RenderTarget::GetTags

Gets the label for subsequent drawing operations.
ID2D1RenderTarget::GetTextAntialiasMode

Gets the current antialiasing mode for text and glyph drawing operations.
ID2D1RenderTarget::GetTextRenderingParams

Retrieves the render target's current text rendering options.
ID2D1RenderTarget::GetTransform

Gets the current transform of the render target.
ID2D1RenderTarget::IsSupported

Indicates whether the render target supports the specified properties. (overload 1/2)
ID2D1RenderTarget::IsSupported

Indicates whether the render target supports the specified properties. (overload 2/2)
ID2D1RenderTarget::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.
ID2D1RenderTarget::PopLayer

Stops redirecting drawing operations to the layer that is specified by the last PushLayer call.
ID2D1RenderTarget::PushAxisAlignedClip

Specifies a rectangle to which all subsequent drawing operations are clipped. (overload 2/2)
ID2D1RenderTarget::PushAxisAlignedClip

Specifies a rectangle to which all subsequent drawing operations are clipped. (overload 1/2)
ID2D1RenderTarget::PushLayer

Adds the specified layer to the render target so that it receives all subsequent drawing operations until PopLayer is called. (overload 2/2)
ID2D1RenderTarget::PushLayer

Adds the specified layer to the render target so that it receives all subsequent drawing operations until PopLayer is called. (overload 1/2)
ID2D1RenderTarget::RestoreDrawingState

Sets the render target's drawing state to that of the specified ID2D1DrawingStateBlock.
ID2D1RenderTarget::SaveDrawingState

Saves the current drawing state to the specified ID2D1DrawingStateBlock.
ID2D1RenderTarget::SetAntialiasMode

Sets the antialiasing mode of the render target. The antialiasing mode applies to all subsequent drawing operations, excluding text and glyph drawing operations.
ID2D1RenderTarget::SetDpi

Sets the dots per inch (DPI) of the render target.
ID2D1RenderTarget::SetTags

Specifies a label for subsequent drawing operations.
ID2D1RenderTarget::SetTextAntialiasMode

Specifies the antialiasing mode to use for subsequent text and glyph drawing operations.
ID2D1RenderTarget::SetTextRenderingParams

Specifies text rendering options to be applied to all subsequent text and glyph drawing operations.
ID2D1RenderTarget::SetTransform

Applies the specified transform to the render target, replacing the existing transformation. All subsequent drawing operations occur in the transformed space. (overload 2/2)
ID2D1RenderTarget::SetTransform

Applies the specified transform to the render target, replacing the existing transformation. All subsequent drawing operations occur in the transformed space. (overload 1/2)

Remarks

Your application should create render targets once and hold onto them for the life of the application or until the render target's EndDraw method returns the D2DERR_RECREATE_TARGET error. When you receive this error, you need to recreate the render target (and any resources it created).

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1.h

See also

Direct2D API Overview

Getting Started

ID2D1Resource