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

Creates Direct2D resources. More...

#include <HWGraphics.h>

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

Public Types

using Base = Factory
 
- Public Types inherited from Harlinn::Windows::Graphics::Factory
typedef Unknown Base
 
- Public Types inherited from Harlinn::Common::Core::Unknown
typedef IUnknown InterfaceType
 

Public Member Functions

 Factory1 (D2D1_FACTORY_TYPE factoryType)
 Constructs a factory object that can be used to create Direct2D resources.
 
void CreateDevice (IDXGIDevice *dxgiDevice, ID2D1Device **d2dDevice) const
 This creates a new Direct2D device from the given IDXGIDevice.
 
void CreateDevice (const DXGI::Device &dxgiDevice, ID2D1Device **d2dDevice) const
 
Device CreateDevice (IDXGIDevice *dxgiDevice) const
 
Device CreateDevice (const DXGI::Device &dxgiDevice) const
 
void CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES1 *strokeStyleProperties, const FLOAT *dashes, UINT32 dashesCount, ID2D1StrokeStyle1 **strokeStyle) const
 This creates a stroke style with the ability to preserve stroke width in various ways.
 
void CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES1 &strokeStyleProperties, const FLOAT *dashes, UINT32 dashesCount, ID2D1StrokeStyle1 **strokeStyle) const
 
void CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES1 *strokeStyleProperties, ID2D1StrokeStyle1 **strokeStyle) const
 
void CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES1 &strokeStyleProperties, ID2D1StrokeStyle1 **strokeStyle) const
 
StrokeStyle1 CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES1 *strokeStyleProperties, const FLOAT *dashes=nullptr, UINT32 dashesCount=0) const
 
StrokeStyle1 CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES1 &strokeStyleProperties, const FLOAT *dashes=nullptr, UINT32 dashesCount=0) const
 
void CreatePathGeometry (ID2D1PathGeometry1 **pathGeometry) const
 Creates a path geometry with new operational methods.
 
PathGeometry1 CreatePathGeometry () const
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION1 *drawingStateDescription, IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock1 **drawingStateBlock) const
 Creates a new drawing state block, this can be used in subsequent SaveDrawingState and RestoreDrawingState operations on the render target.
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION1 *drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams, ID2D1DrawingStateBlock1 **drawingStateBlock) const
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION1 &drawingStateDescription, IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock1 **drawingStateBlock) const
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION1 &drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams, ID2D1DrawingStateBlock1 **drawingStateBlock) const
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION1 &drawingStateDescription, ID2D1DrawingStateBlock1 **drawingStateBlock)
 
void CreateDrawingStateBlock (ID2D1DrawingStateBlock1 **drawingStateBlock)
 
DrawingStateBlock1 CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION1 *drawingStateDescription, IDWriteRenderingParams *textRenderingParams=nullptr) const
 
DrawingStateBlock1 CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION1 *drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams) const
 
DrawingStateBlock1 CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION1 &drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams) const
 
DrawingStateBlock1 CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION1 &drawingStateDescription, IDWriteRenderingParams *textRenderingParams=nullptr) const
 
void CreateGdiMetafile (IStream *metafileStream, ID2D1GdiMetafile **metafile) const
 Creates a new ID2D1GdiMetafile object that you can use to replay metafile content.
 
void CreateGdiMetafile (const Stream &metafileStream, ID2D1GdiMetafile **metafile) const
 
GdiMetafile CreateGdiMetafile (IStream *metafileStream) const
 
GdiMetafile CreateGdiMetafile (const Stream &metafileStream) const
 
void RegisterEffectFromStream (REFCLSID classId, IStream *propertyXml, const D2D1_PROPERTY_BINDING *bindings, UINT32 bindingsCount, const PD2D1_EFFECT_FACTORY effectFactory) const
 This globally registers the given effect. The effect can later be instantiated by using the registered class id. The effect registration is reference counted.
 
void RegisterEffectFromStream (REFCLSID classId, IStream *propertyXml, const PD2D1_EFFECT_FACTORY effectFactory) const
 
void RegisterEffectFromStream (REFCLSID classId, const Stream &propertyXml, const D2D1_PROPERTY_BINDING *bindings, UINT32 bindingsCount, const PD2D1_EFFECT_FACTORY effectFactory) const
 
void RegisterEffectFromStream (REFCLSID classId, const Stream &propertyXml, const PD2D1_EFFECT_FACTORY effectFactory) const
 
void RegisterEffectFromString (REFCLSID classId, PCWSTR propertyXml, const D2D1_PROPERTY_BINDING *bindings, UINT32 bindingsCount, const PD2D1_EFFECT_FACTORY effectFactory) const
 This globally registers the given effect. The effect can later be instantiated by using the registered class id. The effect registration is reference counted.
 
void RegisterEffectFromString (REFCLSID classId, PCWSTR propertyXml, const PD2D1_EFFECT_FACTORY effectFactory) const
 
void UnregisterEffect (REFCLSID classId) const
 This unregisters the given effect by its class id, you need to call UnregisterEffect for every call to ID2D1Factory1::RegisterEffectFromStream and ID2D1Factory1::RegisterEffectFromString to completely unregister it.
 
void GetRegisteredEffects (CLSID *effects, UINT32 effectsCount, UINT32 *effectsReturned, UINT32 *effectsRegistered) const
 Returns the class IDs of the currently registered effects and global effects on this factory.
 
void GetRegisteredEffectsCount (UINT32 *effectsRegistered) const
 Returns the number of currently registered effects and global effects on this factory.
 
UINT32 GetRegisteredEffectsCount () const
 
void GetEffectProperties (REFCLSID effectId, ID2D1Properties **properties) const
 This retrieves the effect properties for the given effect, all of the effect properties will be set to a default value since an effect is not instantiated to implement the returned property interface.
 
Properties GetEffectProperties (REFCLSID effectId) const
 
Multithread GetMultithread () const
 Retrieves the locking mechanism for the Direct2D factory that Direct2D uses to control exclusive resource access in an application that is uses multiple threads.
 
void CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties, const FLOAT *dashes, UINT32 dashesCount, ID2D1StrokeStyle **strokeStyle) const
 Creates an ID2D1StrokeStyle that describes start cap, dash pattern, and other features of a stroke.
 
void CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES &strokeStyleProperties, const FLOAT *dashes, UINT32 dashesCount, ID2D1StrokeStyle **strokeStyle) const
 
StrokeStyle CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties, const FLOAT *dashes=nullptr, UINT32 dashesCount=0) const
 
StrokeStyle CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES &strokeStyleProperties, const FLOAT *dashes=nullptr, UINT32 dashesCount=0) const
 
void CreatePathGeometry (ID2D1PathGeometry **pathGeometry) const
 Creates an empty ID2D1PathGeometry.
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription, IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) const
 Creates an ID2D1DrawingStateBlock that can be used with the SaveDrawingState and RestoreDrawingState methods of a render target.
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) const
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) const
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) const
 
DrawingStateBlock CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription=nullptr, IDWriteRenderingParams *textRenderingParams=nullptr) const
 
DrawingStateBlock CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, IDWriteRenderingParams *textRenderingParams=nullptr) const
 
DrawingStateBlock CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams) const
 
DrawingStateBlock CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams) const
 
- Public Member Functions inherited from Harlinn::Windows::Graphics::Factory
 Factory (D2D1_FACTORY_TYPE factoryType)
 Creates a factory object that can be used to create Direct2D resources.
 
void ReloadSystemMetrics () const
 Forces the factory to refresh any system defaults that it might have changed since factory creation.
 
void CreateRectangleGeometry (const D2D1_RECT_F *rectangle, ID2D1RectangleGeometry **rectangleGeometry) const
 Creates an ID2D1RectangleGeometry.
 
void CreateRectangleGeometry (const D2D1_RECT_F &rectangle, ID2D1RectangleGeometry **rectangleGeometry) const
 
RectangleGeometry CreateRectangleGeometry (const D2D1_RECT_F *rectangle) const
 
RectangleGeometry CreateRectangleGeometry (const D2D1_RECT_F &rectangle) const
 
RectangleGeometry CreateRectangleGeometry (const D2D1_POINT_2F *position, const D2D1_SIZE_F *size) const
 
RectangleGeometry CreateRectangleGeometry (const D2D1_POINT_2F &position, const D2D1_SIZE_F &size) const
 
RectangleGeometry CreateRectangleGeometry (FLOAT left, FLOAT top, FLOAT right, FLOAT bottom) const
 
void CreateRoundedRectangleGeometry (const D2D1_ROUNDED_RECT *roundedRectangle, ID2D1RoundedRectangleGeometry **roundedRectangleGeometry) const
 Creates an ID2D1RoundedRectangleGeometry.
 
void CreateRoundedRectangleGeometry (const D2D1_ROUNDED_RECT &roundedRectangle, ID2D1RoundedRectangleGeometry **roundedRectangleGeometry) const
 
RoundedRectangleGeometry CreateRoundedRectangleGeometry (const D2D1_ROUNDED_RECT *roundedRectangle) const
 
RoundedRectangleGeometry CreateRoundedRectangleGeometry (const D2D1_ROUNDED_RECT &roundedRectangle) const
 
RoundedRectangleGeometry CreateRoundedRectangleGeometry (const D2D1_RECT_F *rectangle, FLOAT radiusX, FLOAT readiusY) const
 
RoundedRectangleGeometry CreateRoundedRectangleGeometry (const D2D1_RECT_F &rectangle, FLOAT radiusX, FLOAT readiusY) const
 
RoundedRectangleGeometry CreateRoundedRectangleGeometry (const D2D1_POINT_2F *position, const D2D1_SIZE_F *size, FLOAT radiusX, FLOAT readiusY) const
 
RoundedRectangleGeometry CreateRoundedRectangleGeometry (const D2D1_POINT_2F &position, const D2D1_SIZE_F &size, FLOAT radiusX, FLOAT readiusY) const
 
RoundedRectangleGeometry CreateRoundedRectangleGeometry (FLOAT left, FLOAT top, FLOAT right, FLOAT bottom, FLOAT radiusX, FLOAT readiusY) const
 
void CreateEllipseGeometry (const D2D1_ELLIPSE *ellipse, ID2D1EllipseGeometry **ellipseGeometry) const
 Creates an ID2D1EllipseGeometry.
 
void CreateEllipseGeometry (const D2D1_ELLIPSE &ellipse, ID2D1EllipseGeometry **ellipseGeometry) const
 
EllipseGeometry CreateEllipseGeometry (const D2D1_ELLIPSE *ellipse) const
 
EllipseGeometry CreateEllipseGeometry (const D2D1_ELLIPSE &ellipse) const
 
EllipseGeometry CreateEllipseGeometry (const D2D1_POINT_2F *centerPoint, FLOAT radiusX, FLOAT radiusY) const
 
EllipseGeometry CreateEllipseGeometry (const D2D1_POINT_2F &centerPoint, FLOAT radiusX, FLOAT radiusY) const
 
EllipseGeometry CreateEllipseGeometry (FLOAT centerX, FLOAT centerY, FLOAT radiusX, FLOAT radiusY) const
 
void CreateGeometryGroup (D2D1_FILL_MODE fillMode, ID2D1Geometry **geometries, UINT32 geometriesCount, ID2D1GeometryGroup **geometryGroup) const
 Creates an ID2D1GeometryGroup, which is an object that holds other geometries.
 
void CreateGeometryGroup (D2D1_FILL_MODE fillMode, const Geometry *geometries, UINT32 geometriesCount, ID2D1GeometryGroup **geometryGroup) const
 
GeometryGroup CreateGeometryGroup (D2D1_FILL_MODE fillMode, ID2D1Geometry **geometries, UINT32 geometriesCount) const
 
GeometryGroup CreateGeometryGroup (D2D1_FILL_MODE fillMode, const Geometry *geometries, UINT32 geometriesCount) const
 
void CreateTransformedGeometry (ID2D1Geometry *sourceGeometry, const D2D1_MATRIX_3X2_F *transform, ID2D1TransformedGeometry **transformedGeometry) const
 Transforms the specified geometry and stores the result as an ID2D1TransformedGeometry object.
 
void CreateTransformedGeometry (ID2D1Geometry *sourceGeometry, const D2D1_MATRIX_3X2_F &transform, ID2D1TransformedGeometry **transformedGeometry) const
 
void CreateTransformedGeometry (const Geometry &sourceGeometry, const D2D1_MATRIX_3X2_F *transform, ID2D1TransformedGeometry **transformedGeometry) const
 
void CreateTransformedGeometry (const Geometry &sourceGeometry, const D2D1_MATRIX_3X2_F &transform, ID2D1TransformedGeometry **transformedGeometry) const
 
TransformedGeometry CreateTransformedGeometry (ID2D1Geometry *sourceGeometry, const D2D1_MATRIX_3X2_F *transform) const
 
TransformedGeometry CreateTransformedGeometry (ID2D1Geometry *sourceGeometry, const D2D1_MATRIX_3X2_F &transform) const
 
TransformedGeometry CreateTransformedGeometry (const Geometry &sourceGeometry, const D2D1_MATRIX_3X2_F *transform) const
 
TransformedGeometry CreateTransformedGeometry (const Geometry &sourceGeometry, const D2D1_MATRIX_3X2_F &transform) const
 
void CreatePathGeometry (ID2D1PathGeometry **pathGeometry) const
 Creates an empty ID2D1PathGeometry.
 
PathGeometry CreatePathGeometry () const
 
void CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties, const FLOAT *dashes, UINT32 dashesCount, ID2D1StrokeStyle **strokeStyle) const
 Creates an ID2D1StrokeStyle that describes start cap, dash pattern, and other features of a stroke.
 
void CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES &strokeStyleProperties, const FLOAT *dashes, UINT32 dashesCount, ID2D1StrokeStyle **strokeStyle) const
 
StrokeStyle CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties, const FLOAT *dashes=nullptr, UINT32 dashesCount=0) const
 
StrokeStyle CreateStrokeStyle (const D2D1_STROKE_STYLE_PROPERTIES &strokeStyleProperties, const FLOAT *dashes=nullptr, UINT32 dashesCount=0) const
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription, IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) const
 Creates an ID2D1DrawingStateBlock that can be used with the SaveDrawingState and RestoreDrawingState methods of a render target.
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) const
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) const
 
void CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) const
 
DrawingStateBlock CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription=nullptr, IDWriteRenderingParams *textRenderingParams=nullptr) const
 
DrawingStateBlock CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, IDWriteRenderingParams *textRenderingParams=nullptr) const
 
DrawingStateBlock CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams) const
 
DrawingStateBlock CreateDrawingStateBlock (const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, const DirectWrite::RenderingParams &textRenderingParams) const
 
void CreateWicBitmapRenderTarget (IWICBitmap *target, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1RenderTarget **renderTarget) const
 Creates a render target that renders to a Microsoft Windows Imaging Component (WIC) bitmap.
 
void CreateWicBitmapRenderTarget (IWICBitmap *target, const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, ID2D1RenderTarget **renderTarget) const
 
RenderTarget CreateWicBitmapRenderTarget (IWICBitmap *target, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties) const
 
RenderTarget CreateWicBitmapRenderTarget (IWICBitmap *target, const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties) const
 
void CreateHwndRenderTarget (const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwndRenderTargetProperties, ID2D1HwndRenderTarget **hwndRenderTarget) const
 Creates an ID2D1HwndRenderTarget, a render target that renders to a window.
 
void CreateHwndRenderTarget (const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, const D2D1_HWND_RENDER_TARGET_PROPERTIES &hwndRenderTargetProperties, ID2D1HwndRenderTarget **hwndRenderTarget) const
 
ControlRenderTarget CreateHwndRenderTarget (const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwndRenderTargetProperties) const
 
ControlRenderTarget CreateHwndRenderTarget (const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, const D2D1_HWND_RENDER_TARGET_PROPERTIES &hwndRenderTargetProperties) const
 
HW_EXPORT ControlRenderTarget CreateHwndRenderTarget (Control &control) const
 
HW_EXPORT ControlRenderTarget CreateHwndRenderTarget (HWND hwnd) const
 
HW_EXPORT ControlRenderTarget CreateControlRenderTarget (Control &control) const
 
HW_EXPORT ControlRenderTarget CreateControlRenderTarget (HWND hwnd) const
 
void CreateDxgiSurfaceRenderTarget (IDXGISurface *dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1RenderTarget **renderTarget) const
 Creates a render target that draws to a DirectX Graphics Infrastructure (DXGI) surface.
 
void CreateDxgiSurfaceRenderTarget (IDXGISurface *dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, ID2D1RenderTarget **renderTarget) const
 
template<typename T >
requires std::is_base_of_v< DXGI::Surface, T>
void CreateDxgiSurfaceRenderTarget (const T &dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1RenderTarget **renderTarget) const
 
template<typename T >
requires std::is_base_of_v< DXGI::Surface, T>
void CreateDxgiSurfaceRenderTarget (const T &dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, ID2D1RenderTarget **renderTarget) const
 
RenderTarget CreateDxgiSurfaceRenderTarget (IDXGISurface *dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties) const
 
RenderTarget CreateDxgiSurfaceRenderTarget (IDXGISurface *dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties) const
 
template<typename T >
requires std::is_base_of_v< DXGI::Surface, T>
RenderTarget CreateDxgiSurfaceRenderTarget (const T &dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties) const
 
template<typename T >
requires std::is_base_of_v< DXGI::Surface, T>
RenderTarget CreateDxgiSurfaceRenderTarget (const T &dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties) const
 
void CreateDCRenderTarget (const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1DCRenderTarget **dcRenderTarget) const
 Creates a render target that draws to a Windows Graphics Device Interface (GDI) device context.
 
void CreateDCRenderTarget (const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, ID2D1DCRenderTarget **dcRenderTarget) const
 
DeviceContextRenderTarget CreateDCRenderTarget (const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties) const
 
DeviceContextRenderTarget CreateDCRenderTarget (const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties) 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

- 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

Creates Direct2D resources.

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ Factory1()

Harlinn::Windows::Graphics::Factory1::Factory1 ( D2D1_FACTORY_TYPE factoryType)
inline

Constructs a factory object that can be used to create Direct2D resources.

Parameters
factoryTypeThe threading model of the factory and the resources it creates.

Member Function Documentation

◆ CreateDevice() [1/4]

Device Harlinn::Windows::Graphics::Factory1::CreateDevice ( const DXGI::Device & dxgiDevice) const
inlinenodiscard

◆ CreateDevice() [2/4]

void Harlinn::Windows::Graphics::Factory1::CreateDevice ( const DXGI::Device & dxgiDevice,
ID2D1Device ** d2dDevice ) const
inline

◆ CreateDevice() [3/4]

Device Harlinn::Windows::Graphics::Factory1::CreateDevice ( IDXGIDevice * dxgiDevice) const
inlinenodiscard

◆ CreateDevice() [4/4]

void Harlinn::Windows::Graphics::Factory1::CreateDevice ( IDXGIDevice * dxgiDevice,
ID2D1Device ** d2dDevice ) const
inline

This creates a new Direct2D device from the given IDXGIDevice.

Parameters
dxgiDevicehe IDXGIDevice object used when creating the ID2D1Device.
d2dDeviceThe requested ID2D1Device object.

The Direct2D device defines a resource domain in which a set of Direct2D objects and Direct2D device contexts can be used together. Each call to CreateDevice returns a unique ID2D1Device object, even if you pass the same IDXGIDevice multiple times.

◆ CreateDrawingStateBlock() [1/18]

DrawingStateBlock Harlinn::Windows::Graphics::Factory::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION & drawingStateDescription,
const DirectWrite::RenderingParams & textRenderingParams ) const
inline

◆ CreateDrawingStateBlock() [2/18]

void Harlinn::Windows::Graphics::Factory::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION & drawingStateDescription,
const DirectWrite::RenderingParams & textRenderingParams,
ID2D1DrawingStateBlock ** drawingStateBlock ) const
inline

◆ CreateDrawingStateBlock() [3/18]

void Harlinn::Windows::Graphics::Factory::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION & drawingStateDescription,
IDWriteRenderingParams * textRenderingParams,
ID2D1DrawingStateBlock ** drawingStateBlock ) const
inline

◆ CreateDrawingStateBlock() [4/18]

DrawingStateBlock Harlinn::Windows::Graphics::Factory::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION & drawingStateDescription,
IDWriteRenderingParams * textRenderingParams = nullptr ) const
inline

◆ CreateDrawingStateBlock() [5/18]

DrawingStateBlock Harlinn::Windows::Graphics::Factory::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION * drawingStateDescription,
const DirectWrite::RenderingParams & textRenderingParams ) const
inline

◆ CreateDrawingStateBlock() [6/18]

void Harlinn::Windows::Graphics::Factory::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION * drawingStateDescription,
const DirectWrite::RenderingParams & textRenderingParams,
ID2D1DrawingStateBlock ** drawingStateBlock ) const
inline

◆ CreateDrawingStateBlock() [7/18]

void Harlinn::Windows::Graphics::Factory::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION * drawingStateDescription,
IDWriteRenderingParams * textRenderingParams,
ID2D1DrawingStateBlock ** drawingStateBlock ) const
inline

Creates an ID2D1DrawingStateBlock that can be used with the SaveDrawingState and RestoreDrawingState methods of a render target.

Parameters
drawingStateDescriptionA structure that contains anti-aliasing, transform, and tags information.
textRenderingParamsOptional text parameters that indicate how text should be rendered.
drawingStateBlockWhen this method returns, contains the address of a pointer to the new drawing state block created by this method.

◆ CreateDrawingStateBlock() [8/18]

DrawingStateBlock Harlinn::Windows::Graphics::Factory::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION * drawingStateDescription = nullptr,
IDWriteRenderingParams * textRenderingParams = nullptr ) const
inline

◆ CreateDrawingStateBlock() [9/18]

DrawingStateBlock1 Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION1 & drawingStateDescription,
const DirectWrite::RenderingParams & textRenderingParams ) const
inline

◆ CreateDrawingStateBlock() [10/18]

void Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION1 & drawingStateDescription,
const DirectWrite::RenderingParams & textRenderingParams,
ID2D1DrawingStateBlock1 ** drawingStateBlock ) const
inline

◆ CreateDrawingStateBlock() [11/18]

void Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION1 & drawingStateDescription,
ID2D1DrawingStateBlock1 ** drawingStateBlock )
inline

◆ CreateDrawingStateBlock() [12/18]

void Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION1 & drawingStateDescription,
IDWriteRenderingParams * textRenderingParams,
ID2D1DrawingStateBlock1 ** drawingStateBlock ) const
inline

◆ CreateDrawingStateBlock() [13/18]

DrawingStateBlock1 Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION1 & drawingStateDescription,
IDWriteRenderingParams * textRenderingParams = nullptr ) const
inline

◆ CreateDrawingStateBlock() [14/18]

DrawingStateBlock1 Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION1 * drawingStateDescription,
const DirectWrite::RenderingParams & textRenderingParams ) const
inline

◆ CreateDrawingStateBlock() [15/18]

void Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION1 * drawingStateDescription,
const DirectWrite::RenderingParams & textRenderingParams,
ID2D1DrawingStateBlock1 ** drawingStateBlock ) const
inline

◆ CreateDrawingStateBlock() [16/18]

void Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION1 * drawingStateDescription,
IDWriteRenderingParams * textRenderingParams,
ID2D1DrawingStateBlock1 ** drawingStateBlock ) const
inline

Creates a new drawing state block, this can be used in subsequent SaveDrawingState and RestoreDrawingState operations on the render target.

Parameters
drawingStateDescriptionThe drawing state description structure.
textRenderingParamsThe DirectWrite rendering params interface.
drawingStateBlockThe address of the newly created drawing state block.

◆ CreateDrawingStateBlock() [17/18]

DrawingStateBlock1 Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( const D2D1_DRAWING_STATE_DESCRIPTION1 * drawingStateDescription,
IDWriteRenderingParams * textRenderingParams = nullptr ) const
inline

◆ CreateDrawingStateBlock() [18/18]

void Harlinn::Windows::Graphics::Factory1::CreateDrawingStateBlock ( ID2D1DrawingStateBlock1 ** drawingStateBlock)
inline

◆ CreateGdiMetafile() [1/4]

GdiMetafile Harlinn::Windows::Graphics::Factory1::CreateGdiMetafile ( const Stream & metafileStream) const
inline

◆ CreateGdiMetafile() [2/4]

void Harlinn::Windows::Graphics::Factory1::CreateGdiMetafile ( const Stream & metafileStream,
ID2D1GdiMetafile ** metafile ) const
inline

◆ CreateGdiMetafile() [3/4]

GdiMetafile Harlinn::Windows::Graphics::Factory1::CreateGdiMetafile ( IStream * metafileStream) const
inline

◆ CreateGdiMetafile() [4/4]

void Harlinn::Windows::Graphics::Factory1::CreateGdiMetafile ( IStream * metafileStream,
ID2D1GdiMetafile ** metafile ) const
inline

Creates a new ID2D1GdiMetafile object that you can use to replay metafile content.

Parameters
metafileStreamA stream object that has the metafile data.
metafileThe address of the newly created GDI metafile object.

◆ CreatePathGeometry() [1/3]

PathGeometry1 Harlinn::Windows::Graphics::Factory1::CreatePathGeometry ( ) const
inline

◆ CreatePathGeometry() [2/3]

void Harlinn::Windows::Graphics::Factory::CreatePathGeometry ( ID2D1PathGeometry ** pathGeometry) const
inline

Creates an empty ID2D1PathGeometry.

Parameters
pathGeometryWhen this method returns, contains the address to a pointer to the path geometry created by this method.

◆ CreatePathGeometry() [3/3]

void Harlinn::Windows::Graphics::Factory1::CreatePathGeometry ( ID2D1PathGeometry1 ** pathGeometry) const
inline

Creates a path geometry with new operational methods.

Parameters
pathGeometryWhen this method returns, contains the address of a pointer to the newly created path geometry.

◆ CreateStrokeStyle() [1/10]

void Harlinn::Windows::Graphics::Factory::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES & strokeStyleProperties,
const FLOAT * dashes,
UINT32 dashesCount,
ID2D1StrokeStyle ** strokeStyle ) const
inline

◆ CreateStrokeStyle() [2/10]

StrokeStyle Harlinn::Windows::Graphics::Factory::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES & strokeStyleProperties,
const FLOAT * dashes = nullptr,
UINT32 dashesCount = 0 ) const
inline

◆ CreateStrokeStyle() [3/10]

void Harlinn::Windows::Graphics::Factory::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES * strokeStyleProperties,
const FLOAT * dashes,
UINT32 dashesCount,
ID2D1StrokeStyle ** strokeStyle ) const
inline

Creates an ID2D1StrokeStyle that describes start cap, dash pattern, and other features of a stroke.

Parameters
strokeStylePropertiesA structure that describes the stroke's line cap, dash offset, and other details of a stroke.
dashesAn array whose elements are set to the length of each dash and space in the dash pattern. The first element sets the length of a dash, the second element sets the length of a space, the third element sets the length of a dash, and so on. The length of each dash and space in the dash pattern is the product of the element value in the array and the stroke width.
dashesCountThe number of elements in the dashes array.
strokeStyleWhen this method returns, contains the address of the pointer to the stroke style created by this method.

◆ CreateStrokeStyle() [4/10]

StrokeStyle Harlinn::Windows::Graphics::Factory::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES * strokeStyleProperties,
const FLOAT * dashes = nullptr,
UINT32 dashesCount = 0 ) const
inline

◆ CreateStrokeStyle() [5/10]

void Harlinn::Windows::Graphics::Factory1::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES1 & strokeStyleProperties,
const FLOAT * dashes,
UINT32 dashesCount,
ID2D1StrokeStyle1 ** strokeStyle ) const
inline

◆ CreateStrokeStyle() [6/10]

StrokeStyle1 Harlinn::Windows::Graphics::Factory1::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES1 & strokeStyleProperties,
const FLOAT * dashes = nullptr,
UINT32 dashesCount = 0 ) const
inline

◆ CreateStrokeStyle() [7/10]

void Harlinn::Windows::Graphics::Factory1::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES1 & strokeStyleProperties,
ID2D1StrokeStyle1 ** strokeStyle ) const
inline

◆ CreateStrokeStyle() [8/10]

void Harlinn::Windows::Graphics::Factory1::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES1 * strokeStyleProperties,
const FLOAT * dashes,
UINT32 dashesCount,
ID2D1StrokeStyle1 ** strokeStyle ) const
inline

This creates a stroke style with the ability to preserve stroke width in various ways.

Parameters
strokeStylePropertiesThe stroke style properties to apply.
dashesAn array of widths for the dashes and gaps.
dashesCountThe size of the dash array.
strokeStyleWhen this method returns, contains the address of a pointer to the newly created stroke style.

It is valid to specify a dash array only if D2D1_DASH_STYLE_CUSTOM is also specified.

◆ CreateStrokeStyle() [9/10]

StrokeStyle1 Harlinn::Windows::Graphics::Factory1::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES1 * strokeStyleProperties,
const FLOAT * dashes = nullptr,
UINT32 dashesCount = 0 ) const
inline

◆ CreateStrokeStyle() [10/10]

void Harlinn::Windows::Graphics::Factory1::CreateStrokeStyle ( const D2D1_STROKE_STYLE_PROPERTIES1 * strokeStyleProperties,
ID2D1StrokeStyle1 ** strokeStyle ) const
inline

◆ GetEffectProperties() [1/2]

Properties Harlinn::Windows::Graphics::Factory1::GetEffectProperties ( REFCLSID effectId) const
inline

◆ GetEffectProperties() [2/2]

void Harlinn::Windows::Graphics::Factory1::GetEffectProperties ( REFCLSID effectId,
ID2D1Properties ** properties ) const
inline

This retrieves the effect properties for the given effect, all of the effect properties will be set to a default value since an effect is not instantiated to implement the returned property interface.

Parameters
effectIdThe ID of the effect to retrieve properties from.
propertiesWhen this method returns, contains the address of a pointer to the property interface that can be used to query the metadata of the effect.

The returned effect properties will have all the mutable properties for the effect set to a default of NULL, or an empty value.

  • Value types will be zero-filled.
  • Blob and string types will be zero-length.
  • Array types will have length 1 and the element of the array will conform to the above rules.

This method cannot be used to return the properties for any effect not visible to DeviceContext::CreateEffect.

◆ GetMultithread()

Multithread Harlinn::Windows::Graphics::Factory1::GetMultithread ( ) const
inline

Retrieves the locking mechanism for the Direct2D factory that Direct2D uses to control exclusive resource access in an application that is uses multiple threads.

Returns
The Direct2D factory locking mechanism.

◆ GetRegisteredEffects()

void Harlinn::Windows::Graphics::Factory1::GetRegisteredEffects ( CLSID * effects,
UINT32 effectsCount,
UINT32 * effectsReturned,
UINT32 * effectsRegistered ) const
inline

Returns the class IDs of the currently registered effects and global effects on this factory.

Parameters
effectsWhen this method returns, contains an array of effects. NULL if no effects are retrieved.
effectsCountThe capacity of the effects array.
effectsReturnedWhen this method returns, contains the number of effects copied into effects.
effectsRegisteredWhen this method returns, contains the number of effects currently registered in the system.

The set of class IDs will be atomically returned by the API. The set will not be interrupted by other threads registering or unregistering effects.

If effectsRegistered is larger than effectCount, the supplied array will still be filled to capacity with the current set of registered effects. This method returns the CLSIDs for all global effects and all effects registered to this factory.

◆ GetRegisteredEffectsCount() [1/2]

UINT32 Harlinn::Windows::Graphics::Factory1::GetRegisteredEffectsCount ( ) const
inline

◆ GetRegisteredEffectsCount() [2/2]

void Harlinn::Windows::Graphics::Factory1::GetRegisteredEffectsCount ( UINT32 * effectsRegistered) const
inline

Returns the number of currently registered effects and global effects on this factory.

Parameters
effectsRegisteredWhen this method returns, contains the number of effects currently registered in the system.

◆ RegisterEffectFromStream() [1/4]

void Harlinn::Windows::Graphics::Factory1::RegisterEffectFromStream ( REFCLSID classId,
const Stream & propertyXml,
const D2D1_PROPERTY_BINDING * bindings,
UINT32 bindingsCount,
const PD2D1_EFFECT_FACTORY effectFactory ) const
inline

◆ RegisterEffectFromStream() [2/4]

void Harlinn::Windows::Graphics::Factory1::RegisterEffectFromStream ( REFCLSID classId,
const Stream & propertyXml,
const PD2D1_EFFECT_FACTORY effectFactory ) const
inline

◆ RegisterEffectFromStream() [3/4]

void Harlinn::Windows::Graphics::Factory1::RegisterEffectFromStream ( REFCLSID classId,
IStream * propertyXml,
const D2D1_PROPERTY_BINDING * bindings,
UINT32 bindingsCount,
const PD2D1_EFFECT_FACTORY effectFactory ) const
inline

This globally registers the given effect. The effect can later be instantiated by using the registered class id. The effect registration is reference counted.

Parameters
classIdThe identifier of the effect to be registered.
propertyXmlA list of the effect properties, types, and metadata.
bindings

An array of properties and methods.

This binds a property by name to a particular method implemented by the effect author to handle the property. The name must be found in the corresponding propertyXml.

Parameters
bindingsCountThe number of bindings in the binding array.
effectFactoryThe static factory that is used to create the corresponding effect.

Direct2D effects must define their properties at registration time via registration XML. An effect declares several required system properties, and can also declare custom properties. See Custom effects for more information about formatting the propertyXml parameter.

RegisterEffectFromStream is both atomic and reference counted. To unregister an effect, call UnregisterEffect with the classId of the effect.

RegisterEffectFromStream does not hold a reference to the DLL or executable file in which the effect is contained. The application must independently make sure that the lifetime of the DLL or executable file completely contains all instances of each registered and created effect.

Aside from the built-in effects that are globally registered, this API registers effects only for this factory, derived device, and device context interfaces.

◆ RegisterEffectFromStream() [4/4]

void Harlinn::Windows::Graphics::Factory1::RegisterEffectFromStream ( REFCLSID classId,
IStream * propertyXml,
const PD2D1_EFFECT_FACTORY effectFactory ) const
inline

◆ RegisterEffectFromString() [1/2]

void Harlinn::Windows::Graphics::Factory1::RegisterEffectFromString ( REFCLSID classId,
PCWSTR propertyXml,
const D2D1_PROPERTY_BINDING * bindings,
UINT32 bindingsCount,
const PD2D1_EFFECT_FACTORY effectFactory ) const
inline

This globally registers the given effect. The effect can later be instantiated by using the registered class id. The effect registration is reference counted.

Parameters
classIdThe identifier of the effect to be registered.
propertyXmlA list of the effect properties, types, and metadata.
bindings

An array of properties and methods.

This binds a property by name to a particular method implemented by the effect author to handle the property. The name must be found in the corresponding propertyXml.

Parameters
bindingsCountThe number of bindings in the binding array.
effectFactoryThe static factory that is used to create the corresponding effect.

Direct2D effects must define their properties at registration time via registration XML. An effect declares several required system properties, and can also declare custom properties. See Custom effects for more information about formatting the propertyXml parameter.

RegisterEffectFromString is both atomic and reference counted. To unregister an effect, call UnregisterEffect with the classId of the effect.

RegisterEffectFromString does not hold a reference to the DLL or executable file in which the effect is contained. The application must independently make sure that the lifetime of the DLL or executable file completely contains all instances of each registered and created effect.

Aside from the built-in effects that are globally registered, this API registers effects only for this factory, derived device, and device context interfaces.

◆ RegisterEffectFromString() [2/2]

void Harlinn::Windows::Graphics::Factory1::RegisterEffectFromString ( REFCLSID classId,
PCWSTR propertyXml,
const PD2D1_EFFECT_FACTORY effectFactory ) const
inline

◆ UnregisterEffect()

void Harlinn::Windows::Graphics::Factory1::UnregisterEffect ( REFCLSID classId) const
inline

This unregisters the given effect by its class id, you need to call UnregisterEffect for every call to ID2D1Factory1::RegisterEffectFromStream and ID2D1Factory1::RegisterEffectFromString to completely unregister it.

Parameters
classIdThe identifier of the effect to be unregistered.

In order for the effect to be fully unloaded, you must call UnregisterEffect the same number of times that you have registered the effect.

The UnregisterEffect method unregisters only those effects that are registered on the same factory. It cannot be used to unregister a built-in effect.


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