XMConvertFloatToHalfStream
XMConvertHalfToFloatStream
XMMatrixDecompose
XMPlaneTransformStream
XMVector2TransformCoordStream
XMVector2TransformNormalStream
XMVector2TransformStream
XMVector3ProjectStream
XMVector3TransformCoordStream
XMVector3TransformNormalStream
XMVector3TransformStream
XMVector3UnprojectStream
XMVector4TransformStream
Expand Minimize

ID2D1DeviceContext interface

Represents a set of state and command buffers that are used to render to a target.

The device context can render to a target bitmap or a command list.

When to implement

Custom implementations are not supported.

Members

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

Methods

The ID2D1DeviceContext interface has these methods.

MethodDescription
CreateBitmap Overloaded.

Creates a bitmap that can be used as a target surface, for reading back to the CPU, or as a source for the DrawBitmap and ID2D1BitmapBrush APIs. In addition, color context information can be passed to the bitmap.

CreateBitmap (D2D1_SIZE_U, void*, UINT32, D2D1_BITMAP_PROPERTIES1*, ID2D1Bitmap1**)

Creates a bitmap that can be used as a target surface, for reading back to the CPU, or as a source for the DrawBitmap and ID2D1BitmapBrush APIs. In addition, color context information can be passed to the bitmap.

CreateBitmapBrush Overloaded.

Creates a bitmap brush, the input image is a Direct2D bitmap object.

CreateBitmapFromDxgiSurface Overloaded.

Creates a bitmap from a DXGI surface that can be set as a target surface or have additional color context information specified.

CreateBitmapFromWicBitmap Overloaded.

Creates a Direct2D bitmap by copying a WIC bitmap.

CreateColorContext

Creates a color context.

CreateColorContextFromFilename

Creates a color context by loading it from the specified filename. The profile bytes are the contents of the file specified by Filename.

CreateColorContextFromWicColorContext

Creates a color context from an IWICColorContext. The D2D1ColorContext space of the resulting context varies, see Remarks for more info.

CreateCommandList

Creates a ID2D1CommandList object.

CreateEffect

Creates an effect from a class ID.

CreateGradientStopCollection

Creates a gradient stop collection, enabling the gradient to contain color channels with values outside of [0,1] and also enabling rendering to a high-color render target with interpolation in sRGB space.

CreateImageBrush Overloaded.

Creates an image brush. The input image can be any type of image, including a bitmap, effect, or a command list.

DrawBitmap Overloaded.

Draws a bitmap to the render target.

DrawGdiMetafile Overloaded.

Draw a metafile to the device context.

DrawGlyphRun

Draws a series of glyphs to the device context.

DrawImage Overloaded.

Draws an image to the device context.

FillOpacityMask Overloaded.

Fill using the alpha channel of the supplied opacity mask bitmap. The brush opacity will be modulated by the mask. The render target antialiasing mode must be set to aliased.

GetDevice

Gets the device associated with a device context.

GetEffectInvalidRectangleCount

Gets the number of invalid output rectangles that have accumulated on the effect.

GetEffectInvalidRectangles

Gets the invalid rectangles that have accumulated since the last time the effect was drawn and EndDraw was then called on the device context.

GetEffectRequiredInputRectangles

Gets the maximum region of each specified input which would be used during a subsequent rendering operation.

GetGlyphRunWorldBounds

Gets the world-space bounds in DIPs of the glyph run using the device context DPI.

GetImageLocalBounds

Gets the local bounds of an image.

GetImageWorldBounds

Gets the world bounds of an image.

GetPrimitiveBlend

Returns the currently set primitive blend used by the device context.

GetRenderingControls

Gets the rendering controls that have been applied to the context.

GetTarget

Gets the target currently associated with the device context.

GetUnitMode

Gets the mode that is being used to interpret values by the device context.

InvalidateEffectInputRectangle

This indicates that a portion of an effect's input is invalid. This method can be called many times.

IsBufferPrecisionSupported

Indicates whether the buffer precision is supported by the underlying Direct3D device.

IsDxgiFormatSupported

Indicates whether the format is supported by the device context.

PushLayer

Push a layer onto the clip and layer stack of the device context.

SetPrimitiveBlend

Changes the primitive blend mode that is used for all rendering operations in the device context.

SetRenderingControls

Sets the rendering controls for the given device context.

SetTarget

The bitmap or command list to which the Direct2D device context will now render.

SetUnitMode

Sets what units will be used to interpret values passed into the device context.

 

Remarks

Any resource created from a device context can be shared with any other resource created from a device context when both contexts are created on the same device.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1_1.h

DLL

D2d1.dll

See also

Devices and Device Contexts
D2D1CreateDeviceContext
ID2D1Device::CreateDeviceContext

 

 

Community Additions

ADD
Show:
© 2014 Microsoft