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

Represents a single continuous stroke of variable-width ink, as defined by a series of Bezier segments and widths. More...

#include <HWGraphics.h>

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

Public Types

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

Public Member Functions

void SetStartPoint (const D2D1_INK_POINT *startPoint) const
 Sets the starting point for this ink object. This determines where this ink object will start rendering.
 
void SetStartPoint (const D2D1_INK_POINT &startPoint) const
 
D2D1_INK_POINT GetStartPoint () const
 Retrieve the start point with which the ink was initialized.
 
void AddSegments (const D2D1_INK_BEZIER_SEGMENT *segments, UINT32 segmentsCount) const
 Adds the given segments to the end of this ink object.
 
void RemoveSegmentsAtEnd (UINT32 segmentsCount) const
 Removes the given number of segments from the end of this ink object.
 
void SetSegments (UINT32 startSegment, const D2D1_INK_BEZIER_SEGMENT *segments, UINT32 segmentsCount) const
 Updates the specified segments in this ink object with new control points.
 
void SetSegmentAtEnd (const D2D1_INK_BEZIER_SEGMENT *segment) const
 Updates the last segment in this ink object with new control points.
 
UINT32 GetSegmentCount () const
 Returns the number of segments in this ink object.
 
void GetSegments (UINT32 startSegment, D2D1_INK_BEZIER_SEGMENT *segments, UINT32 segmentsCount) const
 Retrieves the specified subset of segments stored in this ink object.
 
void StreamAsGeometry (ID2D1InkStyle *inkStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 Retrieves a geometric representation of this ink object.
 
void StreamAsGeometry (ID2D1InkStyle *inkStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const InkStyle &inkStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const InkStyle &inkStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (ID2D1InkStyle *inkStyle, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (ID2D1InkStyle *inkStyle, const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const InkStyle &inkStyle, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const InkStyle &inkStyle, const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (ID2D1InkStyle *inkStyle, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const InkStyle &inkStyle, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (ID2D1InkStyle *inkStyle, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (const InkStyle &inkStyle, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void StreamAsGeometry (ID2D1SimplifiedGeometrySink *geometrySink) const
 
void GetBounds (ID2D1InkStyle *inkStyle, const D2D1_MATRIX_3X2_F *worldTransform, D2D1_RECT_F *bounds) const
 Retrieve the bounds of the ink, with an optional applied transform.
 
void GetBounds (const InkStyle &inkStyle, const D2D1_MATRIX_3X2_F *worldTransform, D2D1_RECT_F *bounds) const
 
void GetBounds (ID2D1InkStyle *inkStyle, const D2D1_MATRIX_3X2_F &worldTransform, D2D1_RECT_F &bounds) const
 
void GetBounds (const InkStyle &inkStyle, const D2D1_MATRIX_3X2_F &worldTransform, D2D1_RECT_F &bounds) const
 
void GetBounds (ID2D1InkStyle *inkStyle, D2D1_RECT_F *bounds) const
 
void GetBounds (const InkStyle &inkStyle, D2D1_RECT_F *bounds) const
 
void GetBounds (ID2D1InkStyle *inkStyle, D2D1_RECT_F &bounds) const
 
void GetBounds (const InkStyle &inkStyle, D2D1_RECT_F &bounds) const
 
void GetBounds (D2D1_RECT_F *bounds) const
 
void GetBounds (D2D1_RECT_F &bounds) 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 single continuous stroke of variable-width ink, as defined by a series of Bezier segments and widths.

Member Typedef Documentation

◆ Base

Member Function Documentation

◆ AddSegments()

void Harlinn::Windows::Graphics::Ink::AddSegments ( const D2D1_INK_BEZIER_SEGMENT * segments,
UINT32 segmentsCount ) const
inline

Adds the given segments to the end of this ink object.

Parameters
segmentsA pointer to an array of segments to be added to this ink object.
segmentsCountThe number of segments to be added to this ink object.

◆ GetBounds() [1/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( const InkStyle & inkStyle,
const D2D1_MATRIX_3X2_F & worldTransform,
D2D1_RECT_F & bounds ) const
inline

◆ GetBounds() [2/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( const InkStyle & inkStyle,
const D2D1_MATRIX_3X2_F * worldTransform,
D2D1_RECT_F * bounds ) const
inline

◆ GetBounds() [3/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( const InkStyle & inkStyle,
D2D1_RECT_F & bounds ) const
inline

◆ GetBounds() [4/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( const InkStyle & inkStyle,
D2D1_RECT_F * bounds ) const
inline

◆ GetBounds() [5/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( D2D1_RECT_F & bounds) const
inline

◆ GetBounds() [6/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( D2D1_RECT_F * bounds) const
inline

◆ GetBounds() [7/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( ID2D1InkStyle * inkStyle,
const D2D1_MATRIX_3X2_F & worldTransform,
D2D1_RECT_F & bounds ) const
inline

◆ GetBounds() [8/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( ID2D1InkStyle * inkStyle,
const D2D1_MATRIX_3X2_F * worldTransform,
D2D1_RECT_F * bounds ) const
inline

Retrieve the bounds of the ink, with an optional applied transform.

Parameters
inkStyleThe ink style to be used in determining the bounds of this ink object.
worldTransformThe world transform to be used in determining the bounds of this ink object.
boundsWhen this method returns, contains the bounds of this ink object.

◆ GetBounds() [9/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( ID2D1InkStyle * inkStyle,
D2D1_RECT_F & bounds ) const
inline

◆ GetBounds() [10/10]

void Harlinn::Windows::Graphics::Ink::GetBounds ( ID2D1InkStyle * inkStyle,
D2D1_RECT_F * bounds ) const
inline

◆ GetSegmentCount()

UINT32 Harlinn::Windows::Graphics::Ink::GetSegmentCount ( ) const
inline

Returns the number of segments in this ink object.

Returns
Returns the number of segments in this ink object.

◆ GetSegments()

void Harlinn::Windows::Graphics::Ink::GetSegments ( UINT32 startSegment,
D2D1_INK_BEZIER_SEGMENT * segments,
UINT32 segmentsCount ) const
inline

Retrieves the specified subset of segments stored in this ink object.

Parameters
startSegmentThe index of the first segment in this ink object to retrieve.
segmentsWhen this method returns, contains a pointer to an array of retrieved segments.
segmentsCountThe number of segments to retrieve. Note that segmentsCount must be less than or equal to the number of segments in the ink object minus startSegment.

◆ GetStartPoint()

D2D1_INK_POINT Harlinn::Windows::Graphics::Ink::GetStartPoint ( ) const
inline

Retrieve the start point with which the ink was initialized.

Returns
The starting point for this ink object.

◆ RemoveSegmentsAtEnd()

void Harlinn::Windows::Graphics::Ink::RemoveSegmentsAtEnd ( UINT32 segmentsCount) const
inline

Removes the given number of segments from the end of this ink object.

Parameters
segmentsCountThe number of segments to be removed from the end of this ink object. Note that segmentsCount must be less or equal to the number of segments in the ink object.

◆ SetSegmentAtEnd()

void Harlinn::Windows::Graphics::Ink::SetSegmentAtEnd ( const D2D1_INK_BEZIER_SEGMENT * segment) const
inline

Updates the last segment in this ink object with new control points.

Parameters
segmentA pointer to the segment data with which to overwrite this ink object's last segment. Note that if there are currently no segments in the ink object, SetSegmentsAtEnd will return an error causing a Harlinn::Common::Core::Exception to be thrown.

◆ SetSegments()

void Harlinn::Windows::Graphics::Ink::SetSegments ( UINT32 startSegment,
const D2D1_INK_BEZIER_SEGMENT * segments,
UINT32 segmentsCount ) const
inline

Updates the specified segments in this ink object with new control points.

Parameters
startSegmentThe index of the first segment in this ink object to update.
segmentsA pointer to the array of segment data to be used in the update.
segmentsCountThe number of segments in this ink object that will be updated with new data. Note that segmentsCount must be less than or equal to the number of segments in the ink object minus startSegment.

◆ SetStartPoint() [1/2]

void Harlinn::Windows::Graphics::Ink::SetStartPoint ( const D2D1_INK_POINT & startPoint) const
inline

◆ SetStartPoint() [2/2]

void Harlinn::Windows::Graphics::Ink::SetStartPoint ( const D2D1_INK_POINT * startPoint) const
inline

Sets the starting point for this ink object. This determines where this ink object will start rendering.

Parameters
startPointThe new starting point for this ink object.

◆ StreamAsGeometry() [1/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const D2D1_MATRIX_3X2_F & worldTransform,
FLOAT flatteningTolerance,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [2/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const D2D1_MATRIX_3X2_F & worldTransform,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [3/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const D2D1_MATRIX_3X2_F * worldTransform,
FLOAT flatteningTolerance,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [4/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const D2D1_MATRIX_3X2_F * worldTransform,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [5/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const InkStyle & inkStyle,
const D2D1_MATRIX_3X2_F & worldTransform,
FLOAT flatteningTolerance,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [6/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const InkStyle & inkStyle,
const D2D1_MATRIX_3X2_F & worldTransform,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [7/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const InkStyle & inkStyle,
const D2D1_MATRIX_3X2_F * worldTransform,
FLOAT flatteningTolerance,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [8/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const InkStyle & inkStyle,
const D2D1_MATRIX_3X2_F * worldTransform,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [9/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const InkStyle & inkStyle,
FLOAT flatteningTolerance,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [10/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( const InkStyle & inkStyle,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [11/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( FLOAT flatteningTolerance,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [12/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( ID2D1InkStyle * inkStyle,
const D2D1_MATRIX_3X2_F & worldTransform,
FLOAT flatteningTolerance,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [13/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( ID2D1InkStyle * inkStyle,
const D2D1_MATRIX_3X2_F & worldTransform,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [14/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( ID2D1InkStyle * inkStyle,
const D2D1_MATRIX_3X2_F * worldTransform,
FLOAT flatteningTolerance,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

Retrieves a geometric representation of this ink object.

Parameters
inkStyleThe ink style to be used in determining the geometric representation.
worldTransformThe world transform to be used in determining the geometric representation.
flatteningToleranceThe flattening tolerance to be used in determining the geometric representation.
geometrySinkThe geometry sink to which the geometry representation will be streamed.

◆ StreamAsGeometry() [15/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( ID2D1InkStyle * inkStyle,
const D2D1_MATRIX_3X2_F * worldTransform,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [16/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( ID2D1InkStyle * inkStyle,
FLOAT flatteningTolerance,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [17/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( ID2D1InkStyle * inkStyle,
ID2D1SimplifiedGeometrySink * geometrySink ) const
inline

◆ StreamAsGeometry() [18/18]

void Harlinn::Windows::Graphics::Ink::StreamAsGeometry ( ID2D1SimplifiedGeometrySink * geometrySink) const
inline

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