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

Represents a brush based on an ID2D1Image. More...

#include <HWGraphics.h>

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

Public Types

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

Public Member Functions

void SetImage (ID2D1Image *image) const
 Sets the image associated with the provided image brush.
 
void SetImage (const Image &image) const
 
void SetExtendModeX (D2D1_EXTEND_MODE extendModeX) const
 Sets how the content inside the source rectangle in the image brush will be extended on the x-axis.
 
void SetExtendModeY (D2D1_EXTEND_MODE extendModeY) const
 Sets the extend mode on the y-axis.
 
void SetInterpolationMode (D2D1_INTERPOLATION_MODE interpolationMode) const
 Sets the interpolation mode for the image brush.
 
void SetSourceRectangle (const D2D1_RECT_F *sourceRectangle) const
 Sets the source rectangle in the image brush.
 
void SetSourceRectangle (const D2D1_RECT_F &sourceRectangle) const
 
void GetImage (ID2D1Image **image) const
 Gets the image associated with the image brush.
 
Image GetImage () const
 
D2D1_EXTEND_MODE GetExtendModeX () const
 Gets the extend mode of the image brush on the x-axis.
 
D2D1_EXTEND_MODE GetExtendModeY () const
 Gets the extend mode of the image brush on the y-axis of the image.
 
D2D1_INTERPOLATION_MODE GetInterpolationMode () const
 Gets the interpolation mode of the image brush.
 
void GetSourceRectangle (D2D1_RECT_F *sourceRectangle) const
 Gets the rectangle that will be used as the bounds of the image when drawn as an image brush.
 
void GetSourceRectangle (D2D1_RECT_F &sourceRectangle) const
 
D2D1_RECT_F GetSourceRectangle () const
 
- Public Member Functions inherited from Harlinn::Windows::Graphics::Brush
void SetOpacity (FLOAT opacity) const
 
FLOAT GetOpacity () const
 
void SetTransform (const D2D1_MATRIX_3X2_F *transform) const
 
void SetTransform (const D2D1_MATRIX_3X2_F &transform) const
 
void GetTransform (D2D1_MATRIX_3X2_F *transform) const
 
- Public Member Functions inherited from Harlinn::Windows::Graphics::Resource
template<typename T = Factory>
requires std::is_base_of_v< Factory, T>
T GetFactory ()
 
- 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

Represents a brush based on an ID2D1Image.

Member Typedef Documentation

◆ Base

Member Function Documentation

◆ GetExtendModeX()

D2D1_EXTEND_MODE Harlinn::Windows::Graphics::ImageBrush::GetExtendModeX ( ) const
inline

Gets the extend mode of the image brush on the x-axis.

Returns
This method returns the x-extend mode.

◆ GetExtendModeY()

D2D1_EXTEND_MODE Harlinn::Windows::Graphics::ImageBrush::GetExtendModeY ( ) const
inline

Gets the extend mode of the image brush on the y-axis of the image.

Returns
This method returns the y-extend mode.

◆ GetImage() [1/2]

Image Harlinn::Windows::Graphics::ImageBrush::GetImage ( ) const
inline

◆ GetImage() [2/2]

void Harlinn::Windows::Graphics::ImageBrush::GetImage ( ID2D1Image ** image) const
inline

Gets the image associated with the image brush.

Parameters
imageWhen this method returns, contains the address of a pointer to the image associated with this brush.

◆ GetInterpolationMode()

D2D1_INTERPOLATION_MODE Harlinn::Windows::Graphics::ImageBrush::GetInterpolationMode ( ) const
inline

Gets the interpolation mode of the image brush.

Returns
This method returns the interpolation mode.

◆ GetSourceRectangle() [1/3]

D2D1_RECT_F Harlinn::Windows::Graphics::ImageBrush::GetSourceRectangle ( ) const
inline

◆ GetSourceRectangle() [2/3]

void Harlinn::Windows::Graphics::ImageBrush::GetSourceRectangle ( D2D1_RECT_F & sourceRectangle) const
inline

◆ GetSourceRectangle() [3/3]

void Harlinn::Windows::Graphics::ImageBrush::GetSourceRectangle ( D2D1_RECT_F * sourceRectangle) const
inline

Gets the rectangle that will be used as the bounds of the image when drawn as an image brush.

Parameters
sourceRectangleWhen this method returns, contains the address of the output source rectangle.

◆ SetExtendModeX()

void Harlinn::Windows::Graphics::ImageBrush::SetExtendModeX ( D2D1_EXTEND_MODE extendModeX) const
inline

Sets how the content inside the source rectangle in the image brush will be extended on the x-axis.

Parameters
extendModeXThe extend mode on the x-axis of the image.

◆ SetExtendModeY()

void Harlinn::Windows::Graphics::ImageBrush::SetExtendModeY ( D2D1_EXTEND_MODE extendModeY) const
inline

Sets the extend mode on the y-axis.

Parameters
extendModeYThe extend mode on the y-axis of the image.

◆ SetImage() [1/2]

void Harlinn::Windows::Graphics::ImageBrush::SetImage ( const Image & image) const
inline

◆ SetImage() [2/2]

void Harlinn::Windows::Graphics::ImageBrush::SetImage ( ID2D1Image * image) const
inline

Sets the image associated with the provided image brush.

Parameters
imageThe image to be associated with the image brush.

◆ SetInterpolationMode()

void Harlinn::Windows::Graphics::ImageBrush::SetInterpolationMode ( D2D1_INTERPOLATION_MODE interpolationMode) const
inline

Sets the interpolation mode for the image brush.

Parameters
interpolationModeHow the contents of the image will be interpolated to handle the brush transform.

◆ SetSourceRectangle() [1/2]

void Harlinn::Windows::Graphics::ImageBrush::SetSourceRectangle ( const D2D1_RECT_F & sourceRectangle) const
inline

◆ SetSourceRectangle() [2/2]

void Harlinn::Windows::Graphics::ImageBrush::SetSourceRectangle ( const D2D1_RECT_F * sourceRectangle) const
inline

Sets the source rectangle in the image brush.

Parameters
sourceRectangleThe source rectangle that defines the portion of the image to tile.

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