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

Represents a complex shape that may be composed of arcs, curves, and lines. More...

#include <HWGraphics.h>

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

Public Types

typedef Geometry Base
 
- Public Types inherited from Harlinn::Windows::Graphics::Geometry
typedef Resource Base
 
- Public Types inherited from Harlinn::Common::Core::Unknown
typedef IUnknown InterfaceType
 

Public Member Functions

void Open (ID2D1GeometrySink **geometrySink) const
 Retrieves the geometry sink that is used to populate the path geometry with figures and segments.
 
GeometrySink Open () const
 
void Stream (ID2D1GeometrySink *geometrySink) const
 Copies the contents of the path geometry to the specified ID2D1GeometrySink.
 
void Stream (const GeometrySink &geometrySink) const
 
void GetSegmentCount (UINT32 *count) const
 Retrieves the number of segments in the path geometry.
 
UINT32 GetSegmentCount () const
 
void GetFigureCount (UINT32 *count) const
 Retrieves the number of figures in the path geometry.
 
UINT32 GetFigureCount () const
 
- Public Member Functions inherited from Harlinn::Windows::Graphics::Geometry
void GetBounds (const D2D1_MATRIX_3X2_F *worldTransform, D2D1_RECT_F *bounds) const
 
D2D1_RECT_F GetBounds (const D2D1_MATRIX_3X2_F *worldTransform=nullptr) const
 
D2D1_RECT_F GetBounds (const D2D1_MATRIX_3X2_F &worldTransform)
 
void GetWidenedBounds (FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, D2D1_RECT_F *bounds) const
 Gets the bounds of the geometry after it has been widened by the specified stroke width and style and transformed by the specified matrix.
 
void GetWidenedBounds (FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, D2D1_RECT_F *bounds) const
 
D2D1_RECT_F GetWidenedBounds (FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
D2D1_RECT_F GetWidenedBounds (FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
D2D1_RECT_F GetWidenedBounds (FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
D2D1_RECT_F GetWidenedBounds (FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
void StrokeContainsPoint (D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, BOOL *contains) const
 Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
 
void StrokeContainsPoint (D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, BOOL *contains) const
 
bool StrokeContainsPoint (D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
bool StrokeContainsPoint (D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
void StrokeContainsPoint (D2D1_POINT_2F point, FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, BOOL *contains) const
 
void StrokeContainsPoint (D2D1_POINT_2F point, FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, BOOL *contains) const
 
bool StrokeContainsPoint (D2D1_POINT_2F point, FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
bool StrokeContainsPoint (D2D1_POINT_2F point, FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
void FillContainsPoint (D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, BOOL *contains) const
 Indicates whether the area filled by the geometry would contain the specified point given the specified flattening tolerance.
 
void FillContainsPoint (D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, BOOL *contains) const
 
bool FillContainsPoint (D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F *worldTransform=nullptr, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
bool FillContainsPoint (D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
void CompareWithGeometry (ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F *inputGeometryTransform, FLOAT flatteningTolerance, D2D1_GEOMETRY_RELATION *relation) const
 Describes the intersection between this geometry and the specified geometry. The comparison is performed using the specified flattening tolerance.
 
void CompareWithGeometry (const Geometry &inputGeometry, const D2D1_MATRIX_3X2_F *inputGeometryTransform, FLOAT flatteningTolerance, D2D1_GEOMETRY_RELATION *relation) const
 
D2D1_GEOMETRY_RELATION CompareWithGeometry (ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F *inputGeometryTransform=nullptr, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
D2D1_GEOMETRY_RELATION CompareWithGeometry (const Geometry &inputGeometry, const D2D1_MATRIX_3X2_F *inputGeometryTransform=nullptr, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
void CompareWithGeometry (ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F &inputGeometryTransform, FLOAT flatteningTolerance, D2D1_GEOMETRY_RELATION *relation) const
 
void CompareWithGeometry (const Geometry &inputGeometry, const D2D1_MATRIX_3X2_F &inputGeometryTransform, FLOAT flatteningTolerance, D2D1_GEOMETRY_RELATION *relation) const
 
D2D1_GEOMETRY_RELATION CompareWithGeometry (ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F &inputGeometryTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
D2D1_GEOMETRY_RELATION CompareWithGeometry (const Geometry &inputGeometry, const D2D1_MATRIX_3X2_F &inputGeometryTransform, FLOAT flatteningTolerance)
 
void Simplify (D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 Creates a simplified version of the geometry that contains only lines and (optionally) cubic Bezier curves and writes the result to an ID2D1SimplifiedGeometrySink.
 
void Simplify (D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Simplify (D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Simplify (ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Tessellate (const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1TessellationSink *tessellationSink) const
 Creates a set of clockwise-wound triangles that cover the geometry after it has been transformed using the specified matrix and flattened using the specified tolerance.
 
void Tessellate (const D2D1_MATRIX_3X2_F *worldTransform, ID2D1TessellationSink *tessellationSink) const
 
void Tessellate (ID2D1TessellationSink *tessellationSink) const
 
void CombineWithGeometry (ID2D1Geometry *inputGeometry, D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F *inputGeometryTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 Combines this geometry with the specified geometry and stores the result in an ID2D1SimplifiedGeometrySink.
 
void CombineWithGeometry (const Geometry &inputGeometry, D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F *inputGeometryTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void CombineWithGeometry (ID2D1Geometry *inputGeometry, D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F *inputGeometryTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void CombineWithGeometry (const Geometry &inputGeometry, D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F *inputGeometryTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void CombineWithGeometry (ID2D1Geometry *inputGeometry, D2D1_COMBINE_MODE combineMode, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void CombineWithGeometry (const Geometry &inputGeometry, D2D1_COMBINE_MODE combineMode, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Outline (const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 Computes the outline of the geometry and writes the result to an ID2D1SimplifiedGeometrySink.
 
void Outline (const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Outline (const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Outline (ID2D1SimplifiedGeometrySink *geometrySink) const
 
void ComputeArea (const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, FLOAT *area) const
 Computes the area of the geometry after it has been transformed by the specified matrix and flattened using the specified tolerance.
 
void ComputeArea (const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, FLOAT *area) const
 
FLOAT ComputeArea (const D2D1_MATRIX_3X2_F *worldTransform=nullptr, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
FLOAT ComputeArea (const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
void ComputeLength (const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, FLOAT *length) const
 Calculates the length of the geometry as though each segment were unrolled into a line.
 
void ComputeLength (const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, FLOAT *length) const
 
FLOAT ComputeLength (const D2D1_MATRIX_3X2_F *worldTransform=nullptr, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
FLOAT ComputeLength (const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance=D2D1_DEFAULT_FLATTENING_TOLERANCE) const
 
void ComputePointAtLength (FLOAT length, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) const
 Calculates the point and tangent vector at the specified distance along the geometry after it has been transformed by the specified matrix and flattened using the default tolerance.
 
void ComputePointAtLength (FLOAT length, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) const
 
void ComputePointAtLength (FLOAT length, const D2D1_MATRIX_3X2_F *worldTransform, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) const
 
void ComputePointAtLength (FLOAT length, const D2D1_MATRIX_3X2_F &worldTransform, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) const
 
void ComputePointAtLength (FLOAT length, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) const
 
void Widen (FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 Widens the geometry by the specified stroke and writes the result to an ID2D1SimplifiedGeometrySink after it has been transformed by the specified matrix and flattened using the specified tolerance.
 
void Widen (FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, const StrokeStyle &strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, const StrokeStyle &strokeStyle, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const
 
void Widen (FLOAT strokeWidth, ID2D1SimplifiedGeometrySink *geometrySink) 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 complex shape that may be composed of arcs, curves, and lines.

Member Typedef Documentation

◆ Base

Member Function Documentation

◆ GetFigureCount() [1/2]

UINT32 Harlinn::Windows::Graphics::PathGeometry::GetFigureCount ( ) const
inline

◆ GetFigureCount() [2/2]

void Harlinn::Windows::Graphics::PathGeometry::GetFigureCount ( UINT32 * count) const
inline

Retrieves the number of figures in the path geometry.

Parameters
countA pointer that receives the number of figures in the path geometry when this method returns. You must allocate storage for this parameter.

◆ GetSegmentCount() [1/2]

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

◆ GetSegmentCount() [2/2]

void Harlinn::Windows::Graphics::PathGeometry::GetSegmentCount ( UINT32 * count) const
inline

Retrieves the number of segments in the path geometry.

Parameters
countA pointer that receives the number of segments in the path geometry when this method returns. You must allocate storage for this parameter.

◆ Open() [1/2]

GeometrySink Harlinn::Windows::Graphics::PathGeometry::Open ( ) const
inline

◆ Open() [2/2]

void Harlinn::Windows::Graphics::PathGeometry::Open ( ID2D1GeometrySink ** geometrySink) const
inline

Retrieves the geometry sink that is used to populate the path geometry with figures and segments.

Parameters
geometrySinkWhen this method returns, geometrySink contains the address of a pointer to the geometry sink that is used to populate the path geometry with figures and segments. This parameter is passed uninitialized.

Because path geometries are immutable and can only be populated once, it is an error to call Open on a path geometry more than once.

Note that the fill mode defaults to D2D1_FILL_MODE_ALTERNATE. To set the fill mode, call SetFillMode before the first call to BeginFigure. Failure to do so will put the geometry sink in an error state.

◆ Stream() [1/2]

void Harlinn::Windows::Graphics::PathGeometry::Stream ( const GeometrySink & geometrySink) const
inline

◆ Stream() [2/2]

void Harlinn::Windows::Graphics::PathGeometry::Stream ( ID2D1GeometrySink * geometrySink) const
inline

Copies the contents of the path geometry to the specified ID2D1GeometrySink.

Parameters
geometrySinkThe sink to which the path geometry's contents are copied. Modifying this sink does not change the contents of this path geometry.

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