ID2D1DeviceContext

<summary> The device context represents a set of state and a command buffer that is used to render to a target bitmap. </summary>

version(Windows)
interface ID2D1DeviceContext : ID2D1RenderTarget {}

Members

Functions

CreateBitmap
HRESULT CreateBitmap(D2D1_SIZE_U size, const(void)* sourceData, UINT32 pitch, const(D2D1_BITMAP_PROPERTIES1)* bitmapProperties, ID2D1Bitmap1* bitmap)

<summary> Creates a bitmap with extended bitmap properties, potentially from a block of memory. </summary>

CreateBitmap
HRESULT CreateBitmap(D2D1_SIZE_U size, const(void*) srcData, UINT32 pitch, const(D2D1_BITMAP_PROPERTIES)* bitmapProperties, ID2D1Bitmap* bitmap)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
CreateBitmap
HRESULT CreateBitmap(D2D1_SIZE_U size, const(void)* sourceData, UINT32 pitch, D2D1_BITMAP_PROPERTIES1 bitmapProperties, ID2D1Bitmap1 bitmap)
Undocumented in source. Be warned that the author may not have intended to support it.
CreateBitmapBrush
HRESULT CreateBitmapBrush(ID2D1Bitmap bitmap, const(D2D1_BITMAP_BRUSH_PROPERTIES1)* bitmapBrushProperties, const(D2D1_BRUSH_PROPERTIES)* brushProperties, ID2D1BitmapBrush1* bitmapBrush)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
CreateBitmapBrush
HRESULT CreateBitmapBrush(ID2D1Bitmap bitmap, const(D2D1_BITMAP_BRUSH_PROPERTIES)* bitmapBrushProperties, const(D2D1_BRUSH_PROPERTIES)* brushProperties, ID2D1BitmapBrush* bitmapBrush)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
CreateBitmapBrush
HRESULT CreateBitmapBrush(ID2D1Bitmap bitmap, ID2D1BitmapBrush1 bitmapBrush)
Undocumented in source. Be warned that the author may not have intended to support it.
CreateBitmapBrush
HRESULT CreateBitmapBrush(ID2D1Bitmap bitmap, D2D1_BITMAP_BRUSH_PROPERTIES1 bitmapBrushProperties, ID2D1BitmapBrush1 bitmapBrush)
Undocumented in source. Be warned that the author may not have intended to support it.
CreateBitmapBrush
HRESULT CreateBitmapBrush(ID2D1Bitmap bitmap, D2D1_BITMAP_BRUSH_PROPERTIES1 bitmapBrushProperties, D2D1_BRUSH_PROPERTIES brushProperties, ID2D1BitmapBrush1 bitmapBrush)
Undocumented in source. Be warned that the author may not have intended to support it.
CreateBitmapFromDxgiSurface
HRESULT CreateBitmapFromDxgiSurface(IDXGISurface surface, const(D2D1_BITMAP_PROPERTIES1)* bitmapProperties, ID2D1Bitmap1* bitmap)

<summary> Creates a bitmap from a DXGI surface with a set of extended properties. </summary>

CreateBitmapFromDxgiSurface
HRESULT CreateBitmapFromDxgiSurface(IDXGISurface surface, D2D1_BITMAP_PROPERTIES1 bitmapProperties, ID2D1Bitmap1 bitmap)
Undocumented in source. Be warned that the author may not have intended to support it.
CreateBitmapFromWicBitmap
HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource wicBitmapSource, const(D2D1_BITMAP_PROPERTIES1)* bitmapProperties, ID2D1Bitmap1* bitmap)

<summary> Create a D2D bitmap by copying a WIC bitmap. </summary>

CreateBitmapFromWicBitmap
HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource wicBitmapSource, const(D2D1_BITMAP_PROPERTIES)* bitmapProperties, ID2D1Bitmap* bitmap)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
CreateBitmapFromWicBitmap
HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource wicBitmapSource, D2D1_BITMAP_PROPERTIES1 bitmapProperties, ID2D1Bitmap1 bitmap)

<summary> Create a D2D bitmap by copying a WIC bitmap. </summary>

CreateBitmapFromWicBitmap
HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource wicBitmapSource, ID2D1Bitmap1 bitmap)

<summary> Create a D2D bitmap by copying a WIC bitmap. </summary>

CreateColorContext
HRESULT CreateColorContext(D2D1_COLOR_SPACE space, const(BYTE)* profile, UINT32 profileSize, ID2D1ColorContext* colorContext)

<summary> Creates a color context from a color space. If the space is Custom, the context is initialized from the profile/profileSize arguments. Otherwise the context is initialized with the profile bytes associated with the space and profile/profileSize are ignored. </summary>

CreateColorContextFromFilename
HRESULT CreateColorContextFromFilename(PCWSTR filename, ID2D1ColorContext* colorContext)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
CreateColorContextFromWicColorContext
HRESULT CreateColorContextFromWicColorContext(IWICColorContext wicColorContext, ID2D1ColorContext* colorContext)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
CreateCommandList
HRESULT CreateCommandList(ID2D1CommandList* commandList)

<summary> Creates a new command list. </summary>

CreateEffect
HRESULT CreateEffect(REFCLSID effectId, ID2D1Effect* effect)

<summary> Create a new effect, the effect must either be built in or previously registered through ID2D1Factory1::RegisterEffectFromStream or ID2D1Factory1::RegisterEffectFromString. </summary>

CreateGradientStopCollection
HRESULT CreateGradientStopCollection(const(D2D1_GRADIENT_STOP)* straightAlphaGradientStops, UINT32 straightAlphaGradientStopsCount, D2D1_COLOR_SPACE preInterpolationSpace, D2D1_COLOR_SPACE postInterpolationSpace, D2D1_BUFFER_PRECISION bufferPrecision, D2D1_EXTEND_MODE extendMode, D2D1_COLOR_INTERPOLATION_MODE colorInterpolationMode, ID2D1GradientStopCollection1* gradientStopCollection1)

<summary> A gradient stop collection represents a set of stops in an ideal unit length. This is the source resource for a linear gradient and radial gradient brush. </summary> <param name="preInterpolationSpace">Specifies both the input color space and the space in which the color interpolation occurs.</param> <param name="postInterpolationSpace">Specifies the color space colors will be converted to after interpolation occurs.</param> <param name="bufferPrecision">Specifies the precision in which the gradient buffer will be held.</param> <param name="extendMode">Specifies how the gradient will be extended outside of the unit length.</param> <param name="colorInterpolationMode">Determines if colors will be interpolated in straight alpha or premultiplied alpha space.</param>

CreateGradientStopCollection
HRESULT CreateGradientStopCollection(const(D2D1_GRADIENT_STOP)* gradientStops, UINT32 gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode, ID2D1GradientStopCollection* gradientStopCollection)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
CreateImageBrush
HRESULT CreateImageBrush(ID2D1Image image, const(D2D1_IMAGE_BRUSH_PROPERTIES)* imageBrushProperties, const(D2D1_BRUSH_PROPERTIES)* brushProperties, ID2D1ImageBrush* imageBrush)

<summary> Creates an image brush, the input image can be any type of image, including a bitmap, effect and a command list. </summary>

CreateImageBrush
HRESULT CreateImageBrush(ID2D1Image image, D2D1_IMAGE_BRUSH_PROPERTIES imageBrushProperties, D2D1_BRUSH_PROPERTIES brushProperties, ID2D1ImageBrush imageBrush)
Undocumented in source. Be warned that the author may not have intended to support it.
CreateImageBrush
HRESULT CreateImageBrush(ID2D1Image image, D2D1_IMAGE_BRUSH_PROPERTIES imageBrushProperties, ID2D1ImageBrush imageBrush)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawBitmap
void DrawBitmap(ID2D1Bitmap bitmap, const(D2D1_RECT_F)* destinationRectangle, FLOAT opacity, D2D1_INTERPOLATION_MODE interpolationMode, const(D2D1_RECT_F)* sourceRectangle, const(D2D1_MATRIX_4X4_F)* perspectiveTransform)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
DrawBitmap
void DrawBitmap(ID2D1Bitmap bitmap, const(D2D1_RECT_F)* destinationRectangle, FLOAT opacity, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode, const(D2D1_RECT_F)* sourceRectangle)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
DrawBitmap
void DrawBitmap(ID2D1Bitmap bitmap, D2D1_RECT_F destinationRectangle, FLOAT opacity, D2D1_INTERPOLATION_MODE interpolationMode, const(D2D1_RECT_F)* sourceRectangle, const(D2D1_MATRIX_4X4_F)* perspectiveTransform)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawBitmap
void DrawBitmap(ID2D1Bitmap bitmap, D2D1_RECT_F destinationRectangle, FLOAT opacity, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_RECT_F sourceRectangle, const(D2D1_MATRIX_4X4_F)* perspectiveTransform)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawBitmap
void DrawBitmap(ID2D1Bitmap bitmap, D2D1_RECT_F destinationRectangle, FLOAT opacity, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_RECT_F sourceRectangle, D2D1_MATRIX_4X4_F perspectiveTransform)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawGdiMetafile
void DrawGdiMetafile(ID2D1GdiMetafile gdiMetafile, const(D2D1_POINT_2F)* targetOffset)

<summary> Draw a metafile to the device context. </summary>

DrawGdiMetafile
void DrawGdiMetafile(ID2D1GdiMetafile gdiMetafile, D2D1_POINT_2F targetOffset)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawGlyphRun
void DrawGlyphRun(D2D1_POINT_2F baselineOrigin, const(DWRITE_GLYPH_RUN)* glyphRun, const(DWRITE_GLYPH_RUN_DESCRIPTION)* glyphRunDescription, ID2D1Brush foregroundBrush, DWRITE_MEASURING_MODE measuringMode)

<summary> Draws the glyph run with an extended description to describe the glyphs. </summary>

DrawGlyphRun
void DrawGlyphRun(D2D1_POINT_2F baselineOrigin, const(DWRITE_GLYPH_RUN)* glyphRun, ID2D1Brush foregroundBrush, DWRITE_MEASURING_MODE measuringMode)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
DrawImage
void DrawImage(ID2D1Image image, const(D2D1_POINT_2F)* targetOffset, const(D2D1_RECT_F)* imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode)

<summary> Draw an image to the device context. The image represents either a concrete bitmap or the output of an effect graph. </summary>

DrawImage
void DrawImage(ID2D1Effect effect, const(D2D1_POINT_2F)* targetOffset, const(D2D1_RECT_F)* imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode)

<summary> Draws the output of the effect as an image. </summary>

DrawImage
void DrawImage(ID2D1Image image, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawImage
void DrawImage(ID2D1Effect effect, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawImage
void DrawImage(ID2D1Image image, D2D1_POINT_2F targetOffset, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawImage
void DrawImage(ID2D1Effect effect, D2D1_POINT_2F targetOffset, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawImage
void DrawImage(ID2D1Image image, D2D1_POINT_2F targetOffset, D2D1_RECT_F imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode)
Undocumented in source. Be warned that the author may not have intended to support it.
DrawImage
void DrawImage(ID2D1Effect effect, D2D1_POINT_2F targetOffset, D2D1_RECT_F imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode)
Undocumented in source. Be warned that the author may not have intended to support it.
FillOpacityMask
void FillOpacityMask(ID2D1Bitmap opacityMask, ID2D1Brush brush, const(D2D1_RECT_F)* destinationRectangle, const(D2D1_RECT_F)* sourceRectangle)

<summary> 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. </summary>

FillOpacityMask
void FillOpacityMask(ID2D1Bitmap opacityMask, ID2D1Brush brush, D2D1_OPACITY_MASK_CONTENT content, const(D2D1_RECT_F)* destinationRectangle, const(D2D1_RECT_F)* sourceRectangle)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
FillOpacityMask
void FillOpacityMask(ID2D1Bitmap opacityMask, ID2D1Brush brush, D2D1_RECT_F destinationRectangle, const(D2D1_RECT_F)* sourceRectangle)
Undocumented in source. Be warned that the author may not have intended to support it.
FillOpacityMask
void FillOpacityMask(ID2D1Bitmap opacityMask, ID2D1Brush brush, D2D1_RECT_F destinationRectangle, D2D1_RECT_F sourceRectangle)
Undocumented in source. Be warned that the author may not have intended to support it.
GetDevice
void GetDevice(ID2D1Device* device)

<summary> Retrieves the device associated with this device context. </summary>

GetEffectInvalidRectangleCount
HRESULT GetEffectInvalidRectangleCount(ID2D1Effect effect, UINT32* rectangleCount)

<summary> Gets the number of invalid ouptut rectangles that have accumulated at the effect. </summary>

GetEffectInvalidRectangles
HRESULT GetEffectInvalidRectangles(ID2D1Effect effect, D2D1_RECT_F* rectangles, UINT32 rectanglesCount)

<summary> Gets the invalid rectangles that are at the output of the effect. </summary>

GetEffectRequiredInputRectangles
HRESULT GetEffectRequiredInputRectangles(ID2D1Effect* renderEffect, const(D2D1_RECT_F)* renderImageRectangle, const(D2D1_EFFECT_INPUT_DESCRIPTION)* inputDescriptions, D2D1_RECT_F* requiredInputRects, UINT32 inputCount)

<summary> Gets the maximum region of each specified input which would be used during a subsequent rendering operation </summary>

GetGlyphRunWorldBounds
HRESULT GetGlyphRunWorldBounds(D2D1_POINT_2F baselineOrigin, const(DWRITE_GLYPH_RUN)* glyphRun, DWRITE_MEASURING_MODE measuringMode, D2D1_RECT_F* bounds)

<summary> Retrieves the world-space bounds in DIPs of the glyph run using the device context DPI. </summary>

GetImageLocalBounds
HRESULT GetImageLocalBounds(ID2D1Image image, D2D1_RECT_F* localBounds)

<summary> This retrieves the local-space bounds in DIPs of the current image using the device context DPI. </summary>

GetImageWorldBounds
HRESULT GetImageWorldBounds(ID2D1Image image, D2D1_RECT_F* worldBounds)

<summary> This retrieves the world-space bounds in DIPs of the current image using the device context DPI. </summary>

GetPrimitiveBlend
D2D1_PRIMITIVE_BLEND GetPrimitiveBlend()

<summary> Returns the primitive blend currently selected into the device context. </summary>

GetRenderingControls
void GetRenderingControls(D2D1_RENDERING_CONTROLS* renderingControls)

<summary> This retrieves the rendering controls currently selected into the device context. </summary>

GetTarget
void GetTarget(ID2D1Image* image)

<summary> Gets the target that this device context is currently pointing to. </summary>

GetUnitMode
D2D1_UNIT_MODE GetUnitMode()

<summary> Returns the unit mode currently set on the device context. </summary>

InvalidateEffectInputRectangle
HRESULT InvalidateEffectInputRectangle(ID2D1Effect effect, UINT32 input, const(D2D1_RECT_F)* inputRectangle)

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

IsBufferPrecisionSupported
BOOL IsBufferPrecisionSupported(D2D1_BUFFER_PRECISION bufferPrecision)

<summary> Indicates whether the buffer precision is supported by D2D. </summary>

IsDxgiFormatSupported
BOOL IsDxgiFormatSupported(DXGI_FORMAT format)

<summary> Indicates whether the format is supported by D2D. </summary>

PushLayer
void PushLayer(const(D2D1_LAYER_PARAMETERS1)* layerParameters, ID2D1Layer layer)

<summary> Push a layer on the device context. </summary>

PushLayer
void PushLayer(const(D2D1_LAYER_PARAMETERS)* layerParameters, ID2D1Layer layer)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
PushLayer
void PushLayer(D2D1_LAYER_PARAMETERS1 layerParameters, ID2D1Layer layer)
Undocumented in source. Be warned that the author may not have intended to support it.
SetPrimitiveBlend
void SetPrimitiveBlend(D2D1_PRIMITIVE_BLEND primitiveBlend)

<summary> Changes the primitive blending mode for all of the rendering operations. </summary>

SetRenderingControls
void SetRenderingControls(const(D2D1_RENDERING_CONTROLS)* renderingControls)

<summary> Sets tuning parameters for internal rendering inside the device context. </summary>

SetRenderingControls
void SetRenderingControls(D2D1_RENDERING_CONTROLS renderingControls)

<summary> Sets tuning parameters for internal rendering inside the device context. </summary>

SetTarget
void SetTarget(ID2D1Image image)

<summary> Sets the target for this device context to point to the given image. The image can be a command list or a bitmap created with the D2D1_BITMAP_OPTIONS_TARGET flag. </summary>

SetUnitMode
void SetUnitMode(D2D1_UNIT_MODE unitMode)

<summary> Changes the units used for all of the rendering operations. </summary>

Meta