Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::Windows::Graphics::CommandSink3 Class Reference

This class performs all the same functions as the existing CommandSink2 class. It also enables access to sprite batch rendering. More...

#include <HWGraphics.h>

Inheritance diagram for Harlinn::Windows::Graphics::CommandSink3:
[legend]
Collaboration diagram for Harlinn::Windows::Graphics::CommandSink3:
[legend]

Public Member Functions

void DrawSpriteBatch (_In_ ID2D1SpriteBatch *spriteBatch, UINT32 startIndex, UINT32 spriteCount, _In_ ID2D1Bitmap *bitmap, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode=D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, D2D1_SPRITE_OPTIONS spriteOptions=D2D1_SPRITE_OPTIONS_NONE) const
 Renders part or all of the given sprite batch to the device context using the specified drawing options.
 
void DrawSpriteBatch (const SpriteBatch &spriteBatch, UINT32 startIndex, UINT32 spriteCount, const Bitmap &bitmap, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode=D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, D2D1_SPRITE_OPTIONS spriteOptions=D2D1_SPRITE_OPTIONS_NONE) const
 
- Public Member Functions inherited from Harlinn::Windows::Graphics::CommandSink2
void DrawInk (ID2D1Ink *ink, ID2D1Brush *brush, ID2D1InkStyle *inkStyle=nullptr) const
 Renders the given ink object using the given brush and ink style.
 
void DrawInk (const Ink &ink, const Brush &brush, ID2D1InkStyle *inkStyle=nullptr) const
 
void DrawInk (const Ink &ink, const Brush &brush, const InkStyle &inkStyle) const
 
void DrawGradientMesh (ID2D1GradientMesh *gradientMesh) const
 Renders a given gradient mesh to the target.
 
void DrawGradientMesh (const GradientMesh &gradientMesh) const
 
void DrawGdiMetafile (ID2D1GdiMetafile *gdiMetafile, const D2D1_RECT_F *destinationRectangle=nullptr, const D2D1_RECT_F *sourceRectangle=nullptr) const
 Draws a metafile to the command sink using the given source and destination rectangles.
 
void DrawGdiMetafile (const GdiMetafile &gdiMetafile, const D2D1_RECT_F *destinationRectangle=nullptr, const D2D1_RECT_F *sourceRectangle=nullptr) const
 
void DrawGdiMetafile (ID2D1GdiMetafile *gdiMetafile, const D2D1_RECT_F &destinationRectangle, const D2D1_RECT_F *sourceRectangle=nullptr) const
 
void DrawGdiMetafile (const GdiMetafile &gdiMetafile, const D2D1_RECT_F &destinationRectangle, const D2D1_RECT_F *sourceRectangle=nullptr) const
 
void DrawGdiMetafile (ID2D1GdiMetafile *gdiMetafile, const D2D1_RECT_F &destinationRectangle, const D2D1_RECT_F &sourceRectangle) const
 
void DrawGdiMetafile (const GdiMetafile &gdiMetafile, const D2D1_RECT_F &destinationRectangle, const D2D1_RECT_F &sourceRectangle) const
 
- Public Member Functions inherited from Harlinn::Windows::Graphics::CommandSink1
void SetPrimitiveBlend1 (D2D1_PRIMITIVE_BLEND primitiveBlend) const
 Sets a new primitive blend mode.
 
- Public Member Functions inherited from Harlinn::Windows::Graphics::CommandSink
void BeginDraw () const
 
void EndDraw () const
 
void SetAntialiasMode (D2D1_ANTIALIAS_MODE antialiasMode) const
 
void SetTags (D2D1_TAG tag1, D2D1_TAG tag2) const
 
void SetTextAntialiasMode (D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) const
 
void SetTextRenderingParams (IDWriteRenderingParams *textRenderingParams) const
 
void SetTransform (const D2D1_MATRIX_3X2_F *transform) const
 
void SetPrimitiveBlend (D2D1_PRIMITIVE_BLEND primitiveBlend) const
 
void SetUnitMode (D2D1_UNIT_MODE unitMode) const
 
void Clear (const D2D1_COLOR_F *color) const
 
void DrawGlyphRun (D2D1_POINT_2F baselineOrigin, const DWRITE_GLYPH_RUN *glyphRun, const DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription, ID2D1Brush *foregroundBrush, DWRITE_MEASURING_MODE measuringMode) const
 
void DrawLine (D2D1_POINT_2F point0, D2D1_POINT_2F point1, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) const
 
void DrawGeometry (ID2D1Geometry *geometry, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) const
 
void DrawRectangle (const D2D1_RECT_F *rect, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) const
 
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) const
 
void DrawImage (ID2D1Image *image, const D2D1_POINT_2F *targetOffset, const D2D1_RECT_F *imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode) const
 
void DrawGdiMetafile (ID2D1GdiMetafile *gdiMetafile, const D2D1_POINT_2F *targetOffset) const
 
void FillMesh (ID2D1Mesh *mesh, ID2D1Brush *brush) const
 
void FillOpacityMask (ID2D1Bitmap *opacityMask, ID2D1Brush *brush, const D2D1_RECT_F *destinationRectangle, const D2D1_RECT_F *sourceRectangle) const
 
void FillGeometry (ID2D1Geometry *geometry, ID2D1Brush *brush, ID2D1Brush *opacityBrush) const
 
void FillRectangle (const D2D1_RECT_F *rect, ID2D1Brush *brush) const
 
void PushAxisAlignedClip (const D2D1_RECT_F *clipRect, D2D1_ANTIALIAS_MODE antialiasMode) const
 
void PushLayer (const D2D1_LAYER_PARAMETERS1 *layerParameters1, ID2D1Layer *layer) const
 
void PopAxisAlignedClip () const
 
void PopLayer () const
 
- Public Member Functions inherited from Harlinn::Common::Core::Unknown
constexpr Unknown () noexcept
 
 Unknown (IUnknown *unknown, bool addref=false) noexcept
 
 Unknown (REFIID iid, const Unknown &unknown, bool throwIfNoInterface=true)
 
 Unknown (const Unknown &other) noexcept
 
 Unknown (Unknown &&other) noexcept
 
 ~Unknown () noexcept
 
constexpr operator bool () const noexcept
 
Unknownoperator= (const Unknown &other) noexcept
 
Unknownoperator= (Unknown &&other) noexcept
 
void swap (Unknown &other) noexcept
 
void ResetPtr (IUnknown *other=nullptr, bool addRef=false) noexcept
 
Unknownoperator= (nullptr_t)
 
IUnknown * Detach ()
 
template<typename T >
requires std::is_base_of_v<Unknown, T >
T As () const
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
bool Is () const noexcept
 
template<typename T >
requires std::is_base_of_v<IUnknown, T>
ComPtr< TAs () const
 
template<typename T >
requires std::is_base_of_v<IUnknown, T>
bool Is () const noexcept
 This function can be used to detect if an object supports a particular COM interface derived from IUnknown.
 
template<typename T = IUnknown>
TGetInterfacePointer () const noexcept
 
bool QueryInterface (REFIID riid, void **itf) const
 Queries a COM object for a pointer to one of its interface; identifying the interface by a reference to its interface identifier (IID). If the COM object implements the interface, then it returns a pointer to that interface after calling IUnknown::AddRef on it.
 
template<typename T >
requires std::is_base_of_v<IUnknown, T>
bool QueryInterface (T **itf) const
 
constexpr bool operator== (const Unknown &other) const noexcept
 
constexpr bool operator!= (const Unknown &other) const noexcept
 
constexpr bool operator== (const IUnknown *other) const noexcept
 
constexpr bool operator!= (const IUnknown *other) const noexcept
 

Additional Inherited Members

- Public Types inherited from Harlinn::Windows::Graphics::CommandSink2
using Base = CommandSink1
 
- Public Types inherited from Harlinn::Windows::Graphics::CommandSink1
using Base = CommandSink
 
- Public Types inherited from Harlinn::Windows::Graphics::CommandSink
using Base = Unknown
 
- Public Types inherited from Harlinn::Common::Core::Unknown
typedef IUnknown InterfaceType
 
- Static Public Member Functions inherited from Harlinn::Common::Core::Unknown
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromClassId (const CLSID &clsid, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromClassId (const wchar_t *clsid, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromClassId (const WideString &clsid, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromProgId (const wchar_t *progId, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromProgId (const WideString &progId, DWORD classContext=CLSCTX_INPROC_SERVER)
 
template<typename T >
requires std::is_base_of_v<Unknown, T>
static T CoCreateInstanceFromDll (const ModuleHandle &dll, const CLSID &clsid)
 
- Protected Attributes inherited from Harlinn::Common::Core::Unknown
IUnknown * unknown_
 

Detailed Description

This class performs all the same functions as the existing CommandSink2 class. It also enables access to sprite batch rendering.

Member Function Documentation

◆ DrawSpriteBatch() [1/2]

void Harlinn::Windows::Graphics::CommandSink3::DrawSpriteBatch ( _In_ ID2D1SpriteBatch * spriteBatch,
UINT32 startIndex,
UINT32 spriteCount,
_In_ ID2D1Bitmap * bitmap,
D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR,
D2D1_SPRITE_OPTIONS spriteOptions = D2D1_SPRITE_OPTIONS_NONE ) const
inline

Renders part or all of the given sprite batch to the device context using the specified drawing options.

Parameters
spriteBatchThe sprite batch to draw.
startIndexThe index of the first sprite in the sprite batch to draw.
spriteCountThe number of sprites to draw.
bitmapThe bitmap from which the sprites are to be sourced. Each sprite’s source rectangle refers to a portion of this bitmap.
interpolationModeThe interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed. The default is D2D1_BITMAP_INTERPOLATION_MODE_LINEAR.
spriteOptionsThe additional drawing options, if any, to be used for this sprite batch. The default is D2D1_SPRITE_OPTIONS_NONE.

◆ DrawSpriteBatch() [2/2]

void Harlinn::Windows::Graphics::CommandSink3::DrawSpriteBatch ( const SpriteBatch & spriteBatch,
UINT32 startIndex,
UINT32 spriteCount,
const Bitmap & bitmap,
D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR,
D2D1_SPRITE_OPTIONS spriteOptions = D2D1_SPRITE_OPTIONS_NONE ) const
inline

The documentation for this class was generated from the following file: