Represents an object that can receive drawing commands. Interfaces that inherit from ID2D1RenderTarget render the drawing commands they receive in different ways.
When to implement
Custom implementations are not supported.
The ID2D1RenderTarget interface inherits from ID2D1Resource. ID2D1RenderTarget also has these types of members:
The ID2D1RenderTarget interface has these methods.
Initiates drawing on this render target.
Clears the drawing area to the specified color.
Creates a Direct2D bitmap.
Creates an ID2D1BitmapBrush from the specified bitmap.
Creates an ID2D1Bitmap by copying the specified Microsoft Windows Imaging Component (WIC) bitmap.
Creates a new bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target .
Creates a layer resource that can be used with this render target and its compatible render targets.
Creates an ID2D1LinearGradientBrush object for painting areas with a linear gradient.
Create a mesh that uses triangles to describe a shape.
Creates an ID2D1RadialGradientBrush object that can be used to paint areas with a radial gradient.
Creates an ID2D1Bitmap whose data is shared with another resource.
Creates a new ID2D1SolidColorBrush that can be used to paint areas with a solid color.
Draws the specified ID2D1Bitmap.
Draws the outline of an ellipse with the specified dimensions and stroke.
Draws the outline of the specified geometry using the specified stroke style.
Draws the specified glyphs.
Draws a line between the specified points using the specified stroke style.
Draws the outline of a rectangle that has the specified dimensions and stroke style.
Draws the outline of the specified rounded rectangle using the specified stroke style.
Draws the specified text using the format information provided by an IDWriteTextFormat object.
Draws the formatted text described by the specified IDWriteTextLayout object.
Ends drawing operations on the render target and indicates the current error state and associated tags.
Paints the interior of the specified ellipse.
Paints the interior of the specified geometry.
Paints the interior of the specified mesh.
Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target.
Paints the interior of the specified rectangle.
Paints the interior of the specified rounded rectangle.
Executes all pending drawing commands.
Retrieves the current antialiasing mode for nontext drawing operations.
Return the render target's dots per inch (DPI).
Gets the maximum size, in device-dependent units (pixels), of any one bitmap dimension supported by the render target.
Retrieves the pixel format and alpha mode of the render target.
Returns the size of the render target in device pixels.
Returns the size of the render target in device-independent pixels.
Gets the label for subsequent drawing operations.
Gets the current antialiasing mode for text and glyph drawing operations.
Retrieves the render target's current text rendering options.
Gets the current transform of the render target.
Indicates whether the render target supports the specified properties.
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.
Stops redirecting drawing operations to the layer that is specified by the last PushLayer call.
Specifies a rectangle to which all subsequent drawing operations are clipped.
Adds the specified layer to the render target so that it receives all subsequent drawing operations until PopLayer is called.
Sets the render target's drawing state to that of the specified ID2D1DrawingStateBlock.
Saves the current drawing state to the specified ID2D1DrawingStateBlock.
Sets the antialiasing mode of the render target. The antialiasing mode applies to all subsequent drawing operations, excluding text and glyph drawing operations.
Sets the dots per inch (DPI) of the render target.
Specifies a label for subsequent drawing operations.
Specifies the antialiasing mode to use for subsequent text and glyph drawing operations.
Specifies text rendering options to be applied to all subsequent text and glyph drawing operations.
Applies the specified transform to the render target, replacing the existing transformation. All subsequent drawing operations occur in the transformed space.
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).
Minimum supported client
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]
Minimum supported server
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]
Minimum supported phone
Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]