Share via


CRenderTarget Class

A wrapper for ID2D1RenderTarget.

class CRenderTarget : public CObject;

Members

Public Constructors

Name

Description

CRenderTarget::CRenderTarget

Constructs a CRenderTarget object.

CRenderTarget::~CRenderTarget

The destructor. Called when a render target object is being destroyed.

Public Methods

Name

Description

CRenderTarget::Attach

Attaches existing render target interface to the object

CRenderTarget::BeginDraw

Initiates drawing on this render target.

CRenderTarget::Clear

Clears the drawing area to the specified color.

CRenderTarget::COLORREF_TO_D2DCOLOR

Converts GDI color and alpha values to the D2D1_COLOR_F object.

CRenderTarget::CreateCompatibleRenderTarget

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

CRenderTarget::Destroy

Deletes one or more resources

CRenderTarget::Detach

Detaches render target interface from the object

CRenderTarget::DrawBitmap

Draws the formatted text described by the specified IDWriteTextLayout object.

CRenderTarget::DrawEllipse

Draws the outline of the specified ellipse using the specified stroke style.

CRenderTarget::DrawGeometry

Draws the outline of the specified geometry using the specified stroke style.

CRenderTarget::DrawGlyphRun

Draws the specified glyphs.

CRenderTarget::DrawLine

Draws a line between the specified points using the specified stroke style.

CRenderTarget::DrawRectangle

Draws the outline of a rectangle that has the specified dimensions and stroke style.

CRenderTarget::DrawRoundedRectangle

Draws the outline of the specified rounded rectangle using the specified stroke style.

CRenderTarget::DrawText

Draws the specified text using the format information provided by an IDWriteTextFormat object.

CRenderTarget::DrawTextLayout

Draws the formatted text described by the specified IDWriteTextLayout object.

CRenderTarget::EndDraw

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

CRenderTarget::FillEllipse

Paints the interior of the specified ellipse.

CRenderTarget::FillGeometry

Paints the interior of the specified geometry.

CRenderTarget::FillMesh

Paints the interior of the specified mesh.

CRenderTarget::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.

CRenderTarget::FillRectangle

Paints the interior of the specified rectangle.

CRenderTarget::FillRoundedRectangle

Paints the interior of the specified rounded rectangle.

CRenderTarget::Flush

Executes all pending drawing commands.

CRenderTarget::GetAntialiasMode

Retrieves the current antialiasing mode for nontext drawing operations.

CRenderTarget::GetDpi

Returns the render target's dots per inch (DPI)

CRenderTarget::GetMaximumBitmapSize

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

CRenderTarget::GetPixelFormat

Retrieves the pixel format and alpha mode of the render target

CRenderTarget::GetPixelSize

Returns the size of the render target in device pixels

CRenderTarget::GetRenderTarget

Returns ID2D1RenderTarget interface

CRenderTarget::GetSize

Returns the size of the render target in device-independent pixels

CRenderTarget::GetTags

Gets the label for subsequent drawing operations.

CRenderTarget::GetTextAntialiasMode

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

CRenderTarget::GetTextRenderingParams

Retrieves the render target's current text rendering options.

CRenderTarget::GetTransform

Applies the specified transform to the render target, replacing the existing transformation. All subsequent drawing operations occur in the transformed space.

CRenderTarget::IsSupported

Indicates whether the render target supports the specified properties

CRenderTarget::IsValid

Checks resource validity

CRenderTarget::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.

CRenderTarget::PopLayer

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

CRenderTarget::PushAxisAlignedClip

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.

CRenderTarget::PushLayer

Adds the specified layer to the render target so that it receives all subsequent drawing operations until PopLayer is called.

CRenderTarget::RestoreDrawingState

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

CRenderTarget::SaveDrawingState

Saves the current drawing state to the specified ID2D1DrawingStateBlock.

CRenderTarget::SetAntialiasMode

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

CRenderTarget::SetDpi

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

CRenderTarget::SetTags

Specifies a label for subsequent drawing operations.

CRenderTarget::SetTextAntialiasMode

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

CRenderTarget::SetTextRenderingParams

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

CRenderTarget::SetTransform

Overloaded. Applies the specified transform to the render target, replacing the existing transformation. All subsequent drawing operations occur in the transformed space.

Protected Methods

Name

Description

CRenderTarget::VerifyResource

Verifies CD2DResource object validity; creates the object if it didn't already exist.

Public Operators

Name

Description

CRenderTarget::operator ID2D1RenderTarget*

Returns ID2D1RenderTarget interface

Protected Data Members

Name

Description

CRenderTarget::m_lstResources

A list of pointers to CD2DResource objects.

CRenderTarget::m_pRenderTarget

A pointer to an ID2D1RenderTarget object.

CRenderTarget::m_pTextFormatDefault

A pointer to CD2DTextFormat object that contains a default text format.

Inheritance Hierarchy

CObject

CRenderTarget

Requirements

Header: afxrendertarget.h

See Also

Other Resources

MFC Classes